Resource file
This is regarding adding image to a resourcefile.
In my project, we use ultrawinlistbar. In this we place icons.
These icons are populated from the resource files.
Now i need to add an image to an already existing resx file.
How do i do this?
Please provide me any study material or any idea on how to solve this
problem.
It would be of great help. Thanks. :)
--
Regards
Ginny Tag: Down Load Manager Tag: 103051
MDI child icon problem
Hi,
I'm working with VS.NET2005 and building MDI application. All of my
child forms have to be maximized.
Problem is that when they are maximized before showing them, default
form icon is shown, not the one that I set. I also disabled
minimize/maximize buttons, but the restore down button is still
enabled. Icon and maxmize(restore) button get to normal if I resize
parent form, but that is not solution.
Any ideas how to handle this? Tag: Down Load Manager Tag: 103046
Serial no check - setup & deployment project
Hi techies
I have a registration form to download my application. During this
registration i generate serial no for that user and i am sending to
user by e-mail
The download contains my application deployed in .net setup &
deployment project. During installation the user has to give the serial
no which i sent to him by mail. If it is a valid serial then i should
allow them to install otherwise not.
In .net customer information dialog with serial number is available.
But i do not understand the goal of this dialog. will my scenario sit
in this dialog.
Or we have another option of Register user dialog which is only to call
an exe not for validation, will it be useful for me.
But goal is to stop the installation when they give wrong serial no.
Suggestions please Tag: Down Load Manager Tag: 103038
ASP.NET vs Windows Forms for building client application
I kind of understand the ASP.NET architecture in terms of building web pages
with embedded server controls, where the .aspx is run on the client and the
.aspx.cs runs on the server.
But what if I want to build an ASP.NET based application that is to be run
entirely on a client (all files hosted on the client and run on the same
client)? What would that client need to run it?
I want to write an application that can be run standalone on a PC (not
hosted on a web server and accessed from a PC), which uses web technology
like javascript and Ajax, while also being able to code the primary logic in
C#. I have the choice of a windows forms rich client application which uses
a WebBrowser control, or a native ASP.NET application. But I'm not sure the
latter is even feasible for being deployed and run standalone on a PC -
would it need IIS and .NET framework installed, and even more? Tag: Down Load Manager Tag: 103035
HELP: drawing on winform from native Win32 paint crash app....
Hi,
I have an application written in C# which will use some custom libraries
written in native C++. To bridge between the C# application layer and the
native C++ library side, I created an IJW assembly using mixed mode C++/CLI
and native C++. From the C# application side, I need to pass a window handle
to the custom library so that inside this library, it will do some drawing
on this screen. So, I from the C# application passed a Control.Handle to the
library. However, the moment the custom library tries to draw something on
this screen(I used SPY++ to trace it), it will crash when WM_PAINT is
called. The error is
AccessViolationException: Attempted to read or write protected memory. This
is often an indication that other memory is corrupt.
Why does this happen? How do I solve it ?. I have even tried creating a
window on the IJW library using CreateWindow("STATIC"...) and pass this to
the custom library for it to use but the problem still occurs. If this
window is hidden. the app will not crash. It will only crash the moment this
window is shown.
Anyone could help me on this? Thanks!!!!
John Tag: Down Load Manager Tag: 103033
HELP: drawing on winform from native Win32 paint crash app....
Hi,
I have an application written in C# which will use some custom libraries
written in native C++. To bridge between the C# application layer and the
native C++ library side, I created an IJW assembly using mixed mode C++/CLI
and native C++. From the C# application side, I need to pass a window handle
to the custom library so that inside this library, it will do some drawing
on this screen. So, I from the C# application passed a Control.Handle to the
library. However, the moment the custom library tries to draw something on
this screen(I used SPY++ to trace it), it will crash when WM_PAINT is
called. The error is
AccessViolationException: Attempted to read or write protected memory. This
is often an indication that other memory is corrupt.
Why does this happen? How do I solve it ?. I have even tried creating a
window on the IJW library using CreateWindow("STATIC"...) and pass this to
the custom library for it to use but the problem still occurs. If this
window is hidden. the app will not crash. It will only crash the moment this
window is shown.
Anyone could help me on this? Thanks!!!!
John Tag: Down Load Manager Tag: 103032
Countries, States, and DataGridViews
Hi all,
I'm trying to get two columns in a DataGridView to talk to each other.
One of the columns contains countries. The other contains locales
(states, provinces, territories, etc.). Both of these columns are set
up as DataGridViewComboBoxColumns.
I want it to work so that, if the user selects a country, the locale
combo box in the adjacent cell will be auto-filtered to show only
locales for the selected country. Similarly, if the user selects a
locale first, the appropriate country should be auto-selected.
Is this possible? If so, how should it be done?
I thought maybe I could add a WHERE clause to the Locale SELECT query,
but I couldn't figure out how to test it against the value of the
neighboring cell (tried to create a @Country parameter but got
nowhere). Also not sure if the combo boxes in a single column can even
have unique filters.
Another thought was that I may need to write event handlers for the
combo boxes that apply filters. But this still requires that you can
have unique filters for the combo boxes in a column.
Any help on this much appreciated.
Thanks,
-Dan Tag: Down Load Manager Tag: 103031
0 is not a valid handle
Hello,
I have a windows forms app built with vb.net, framework v. .1.1, sql server
2k5 backend, and uses crystal reports for .net. The app runs on a terminal
server with no more than five users. The problem is about once every other
day, when one of the users tries to print a report they receive a message box
with the error '0 is not a valid handle' Once this happens the server must
be restarted, because everyone else will receive the same error until the
server is restarted. Any ideas or help on how to track this down is really
appreciated.
TIA Tag: Down Load Manager Tag: 103028
Combox Autocomplete, but read-only
I'm working with C# in Visual Studio 2005. I have a combobox with
AutoCompleteSource = ListItems and DropDownStyle = DropDown. I want users to
be able to type in the combobox and the control to autocomplete (Append
AutoCompleteMode), but have their options limited to the control's ListItems.
Right now the autocomplete works fine, but they can type anything that isn't
in the list. Is there an easy way to set the control to do this or am I going
to have to write code to verify what was typed during TextUpdate or another
event? Tag: Down Load Manager Tag: 103027
How to change a DataColumn to ComboBox type column in a DataSet?
Hi,
how can I change a DataColumn to ComboBox type column in a DataSet?
After I add a new column into the DataSet using
MyDataSet.DataTable.Columns.Add("ColName");
I'd like to change its type so it would appear as a
DataGridViewComboBoxColumn in a DataGridView bound to this DataTable.
I also tried to create the ComboBox type column in the DataSet directly,
but failed (the Add method allows to create DataColumn columns only).
Or: could it be done by changing the column type in the DataGridView? If
so, how?
Thanks...
With regards
nvx Tag: Down Load Manager Tag: 103022
2nd form on top
I'm trying to do something similar to what outlook does with its task
reminders and haven't been able to accomplish this the way I want. When a
reminder is due, it pops that window up. And it stays on top but it's
deactivated and the Outlook window is the active window. And if you click
on the title bar for outlook, it'll pull it to the front. So I've tried
various mechanisms to accomplish this such as using topmost and then
unsetting it. The best I've gotten so far is setting the child window's
owner temporarily to the main form. And then setting the child window's
owner to null after I've activated the main form. The problem with this is
that it does some funky things down in the taskbar. As soon as I set the
owner to the current window, it will remove it from the taskbar. Does
anybody know of a way to accomplish what I'm trying to do without this odd
behavior?
Lance Johnson Tag: Down Load Manager Tag: 103021
DataGridView loses key up events?
Hi all
I have a data grid view, and I also have a key up event which watches
only for the F5 key. It works fine, except that after the initial
press, the datagridview ignores subsequent key up events until I move
the selection to another cell.
Its very odd, because i set SuppressKeyPress and Handled to true, and I
get the same behavior if the Form is handling the event instead.
Any ideas?
Thanks
Andy Tag: Down Load Manager Tag: 103019
Use of Program.cs
I'm finally getting up to speed on VS 2005 and see that there is now a class
named Program that contains the main entry point for Windows Forms
applications. Yes, I understand that this is something that VS creates for
us and that we are not *required* to use it as is.
My question:
Are many of you who are writing non trivial Windows Forms applications
keeping this Program.cs file as generated by VS? Are you using it "as is" or
do you throw other things in there? If so, what else do you add to
Program.cs?
(just wondering what most developers think of this change and how you are
using it).
Thanks. Tag: Down Load Manager Tag: 103014
multiple threads with a form
Hi,
I have a form in main thread. I also use a 2nd thread as datalayer for
dataset <--> SQL Server. I have some controls that binds with the dataset.
When the 2nd thread modifies the dataset, it will trigger events of a
control that binds to the dataset. My question is if the event run on the 2nd
thread or the main thread?
When I step in, I check Me.InvokeRequired and it's True. Does that mean the
event run on the 2nd (background) thread?
Thanks in advance.
Li Tag: Down Load Manager Tag: 103005
Slow drawing speed of WinForms (esp via COM interop)
Hi,
Has anybody experienced severe slow-down with the drawing speed of
WinForms? It's not fast at the best of time, but the particular
scenario I am having problems with is via COM interop and Excel.
The structure is:
Excel VBA macro
|
V
instantiate and call a COM wrapper class exposed
by my assembly using ComVisible(true)
|
V
Wrapper class instantiates the WinForm
and displays it
The forms don't do anything special, they contain maybe 10-20
controls, including one or two grids, but you can sit there and watch
them paint themselves control-by-control.
I am using data binding, if that helps.
Any help to fix this will be very gratefully received, but even if you
have experienced something similar please reply so that I know I am
not alone!
--
Phil Tag: Down Load Manager Tag: 103004
Regarding updating one comboBox from another: what order is best for clearing and updating the second box?
I am having an issue with graphical corruption upon re-selecting a
combobox which upon 'selected index change' event should list file
names in that folder in a separate combobox. Here is the code:
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
IniFile INI = new IniFile(@"c:\\data\TM.ini");
string MisFileDir = INI.IniReadValue("Main", "MisFileDir");
//MessageBox.Show(MisFileDir + @"\" + this.comboBox2.Text +
@"\");
DirectoryInfo dir = new DirectoryInfo(MisFileDir + @"\" +
this.comboBox2.Text + @"\");
FileInfo[] misfiles = dir.GetFiles();
comboBox1.Items.Clear();
comboBox1.BeginUpdate();
foreach (FileInfo f in misfiles)
{
comboBox1.Items.Add(f.Name);
}
comboBox1.Update();
}
As you can see, I'm using an INI file class that utilizes a
kernel32.dll function to read from the INI. (see this article -
http://www.codeproject.com/csharp/cs_ini.asp?df=100&forumid=3467&exp=...)
This part works perfectly well. And upon the first selection of
comboBox2 , comboBox1 usually updates fine with a list of files in the
given folder.
The problem comes primarily when I select a different index in
comboBox2, the comboBox1 imagery corrupts. I can still see the indexes,
but the text of that comboBox is invisible or garbled. [yes i should
have used the opposite numbers for their names! sorry for confusion:)]
Question:
My question is, am I updating the comboBox1 items in the appropriate
order? What is the best way to clear a combobox and re-add items to it?
Here is an image of the corruption:
http://seow.trianglesimsociety.org/corruptedimage.JPG
Thanks for any suggestions you may be able to provide.
MurdockSE Tag: Down Load Manager Tag: 102999
Toolbar question
Besides querying the Text property, how do you find out which button on
the toolbar has been clicked? The Name property doesn't appear in the
code window, but only appears in the design mode.
The problem is that I have added a lot of spaces to the left of the
label of one of my buttons. The actual label text I have entered in the
design mode is " Exit Map".
When I query this:
else if (e.Button.Text.Trim() == "Exit Map")
{
this.Dispose();
this.Close();
}
The code skips this condition altogether. For the other labels, it
enters the construct as it should. I am a bit confused. Tag: Down Load Manager Tag: 102998
Slow Startup Time for NTD Winforms
Hi,
We are using NTD to deploy our smart client .NET app over the web. When the
application starts up on a client, there are numerous HTTP requests for
files such as:
"application.resources", "application.resources.dll",
"application.resources.exe", "bin/application.resources", etc.
These requests all returned a HTTP 404 not found. I have been trying to
find a way to eliminate these requests. I currently have in place a
workaround that basically places an empty file with the first name requested
for each assembly. This reduces the number of requests from around 32 per
assembly to 2 per assembly. I would still like to get rid of them
altogether, if possible.
I have read here and there others who have experienced this problem. One of
the solutions I came across was to use the following code:
Thread.CurrentThread.CurrentUICulture =
System.Globalization.CultureInfo.InvariantCulture;
I tried putting this line as the first line in my Sub Main() but the initial
requests did not subside. I think that maybe I am not using it correctly,
but I have been unable to find more information about this.
Any help of how to eliminate these requests would be greatly appreciated.
Thank you,
Marc Tag: Down Load Manager Tag: 102997
Loop through controls
I have a winform with a number of user controls. On of the control is a
tab control which contains a number of pages where each page has
textboxes and other controls on it. I would like to loop through all
the texboxes on one of the tab pages and empty each and every one of
them. However, I only manage to loop through the separate tab pages and
not their content. Any ideas?
/erik Tag: Down Load Manager Tag: 102994
Drag/Drop from Opera
I've implemented a standard drag/drop mechanism into my form so that the
user can drag in an image from a web browser. This works fine for the
standard browsers, but is there any reason why this wouldn't work for Opera
? And if so is there a workaround ? Tag: Down Load Manager Tag: 102991
menustrip on form resize
Hi Techies,
I am using menustrip on my windows application, i have created user
control as header control for all forms. Inside that header control i
have menustrip.
While resizing the form,some of the menu is getting disappeared. For
that menustrip should show the >> button like all other windows
application, to see all those hidden menus.
How can we do this.
Thanx Tag: Down Load Manager Tag: 102989
Bad behaviour on windows forms designer
Hi ,
Im making a localizable GUI with windows forms using the designer of visual
studio 2005 and im having some troubles.
I configure the colors and disposition of the elements for the GUI in the
default language option and then later in the spanish language ang english
language.
But sometimes when im for example in the english or spanish language and
come back to the default language option the colors and some properties of
some of my elements have gone!!!!!!!! Why visual studio changes me
automatically the configuration i have put? And i cant bother on putting one
time after another the same configuration because vs have changed it!
Someone can tell me please how can i solve this problem? Tag: Down Load Manager Tag: 102988
Responding to clicks from a WebBrowser control in a Form
Any way I can write a Windows Form that generates some HTML (to view in a
WebBrowser control) that responds to mouse clicks? I mean responds by firing
c# code in my windows form. I suspect I'll need a little javascript, but I
know nothing about that. A simple example would be really useful. Tag: Down Load Manager Tag: 102986
How to set ToolTipText for ComboBox items in a DataGridViewComboBoxColumn column? (C#)
Hello,
how can I set ToolTipText for ComboBox items in a
DataGridViewComboBoxColumn column? Is there any elegant way similar to
DataGridViewComboBoxColumn column DataSource or do I have to assign the
ToolTipText manually for each ComboBox item? I would be very grateful
for a short sample code...
Any help would be appreciated...
With regards
nvx Tag: Down Load Manager Tag: 102985
Enter and Leave events
I am trying to understand Enter and Leave events for a user control. I
am using Visual Studio 2005, using VB, for a Windows Forms application.
I am showing and hiding (by changing visible property) user controls on
my main form (within a panel) based on NavBar links being clicked on. I
put code in the Enter and Leave events to simply show a message. Here's
what happens...
The first time the contol is shown, the Enter event fires.
The first time I click on another NavBarItem, the Leave event fires.
However, the control associated with the clicked on NavBarItem doesn't
show.
After that, the Enter and Leave events no longer fire when control's
visibility is changed.
So, I guess it's not the change in visibility that fires these events.
Then what does cause them to fire?
What if I want to check for certain conditions being met before I allow
a user control to be hidden (Visible=False) and, if they're not met, I
disallow the change (i.e. keep it visible and don't show the new user
control)? Tag: Down Load Manager Tag: 102981
Data Source drag/drop not allowed on inherited form
In VS 2005 I have a base form that is designed to be inherited by many other
forms within an application. This base form contains a tab control with two
tab pages, among several other controls. The second tab page (lets call it
TabPage2) has the Modifiers property set to Protected so that any inherited
forms can add controls to the tab.
When I create an inherited form, I can drag new controls from the toolbar to
TabPage2 without a problem. However, what I would really like to do is drag
a table (or selected fields) from the Data Sources pane so that the data
bound form fields are created automatically. That would be a wonderful
convenience. The only problem is, when I try to drag a field over TabPage2,
I get the "not allowed" cursor symbol and the drop operation does nothing.
As another point of interest, this base form was brought over from a VS 2003
project that is being converted and upgraded using VS 2005. I'm not sure if
the version change is affecting the outcome or not. The base form and its
related code are a little complex.
In an effort to isolate the problem, I started a new project and created a
very simple form with the same tab control design. When I inherited this
simple base form and tried to drag from the Data Source window, it worked
perfectly. Very mysterious. Something in the old base form is preventing
the drag and drop operation from working (although not for regular toolbar
controls).
Any ideas on how to isolate or debug this?
Thanks.
--
Jo-Anne V Tag: Down Load Manager Tag: 102978
WinForm Single Instance App errors out with AccessViolationException
I have a couple of windows form applications that I am wanting to integrate
and have been playing around with the Single Instance Application setting.
I have tried this with my own app and the sample SingleInstance05 that I got
from MSDN. I can run it, but if I go to a cmd console and go to the bin
directory and try and run the app again to trigger the SingleInstance
functionality, I get a System.AccessViolationException of
{"Attempted to read or write protected memory. This is often an indication
that other memory is corrupt."}
The stackTrace is as follows:
at
System.Net.UnsafeNclNativeMethods.OSSOCK.WSAGetOverlappedResult(SafeCloseSocket
socketHandle, IntPtr overlapped, UInt32& bytesTransferred, Boolean wait,
IntPtr ignored)
at
System.Net.Sockets.BaseOverlappedAsyncResult.CompletionPortCallback(UInt32
errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at
System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32
errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
Any suggestions?
TIA,
J. Clay Tag: Down Load Manager Tag: 102974
Scroll bars and docking
Hi all, I've managed to simplify my problem down to its bare roots. I
have a Form that contains three panels. All three panels have their
docking set to Top. Inside these panels I have a single UserControl.
The UserControl's right side exceeds the width of the Form, but the
bottom scroll bar does not appear.
However, I can increase the size of the Form and I can see the
remainder of the UserControl. Is there some way to keep these panels
docked to Top and still get the scroll bar to appear when necessary on
the bottom?
Thanks,
Novice Tag: Down Load Manager Tag: 102969
q; find day passed
Dim ts As TimeSpan = crun.Subtract(lrun)
I am using this to find the elapsed time, is there any way I can do this
comparison without time part, such as if lrun=07/16/2006 and crun=07/17/2006
I need to return 1 since there has been 1 day passed. Tag: Down Load Manager Tag: 102967
Sorting of DataGridViewComboBoxColumn type columns
Hi,
is it possible to sort DataGridViewComboBoxColumn type columns by
clicking on the header cell (in DataGridViewColumnSortMode.Automatic
case)? It doesn't seem to work or there is a bug in my code. There
should be an arrow sign (triangle) in the header cell after clicking on
it, but there doesn't appear any...
Thanks for any help.
With regards
nvx Tag: Down Load Manager Tag: 102965
How to binding data with enable/disable the textbox or control visible property according to the some field values?
I know how to bind data to display on the controls, but Can I also bind the
'enable' or 'visible' properties according to some fields' values, such as
when 'OrderStatus' field is closed ('C' value) will set all input controls'
enable to false. Or such as When 'OrderItemStatus' field value is partial
released ('P' value), it will set some controls' visible to true or false
value. Tag: Down Load Manager Tag: 102964
Form initial display issue
I have a form display issue that surely others have encountered and
have resolved. I couldn't find any posts about it, which I attribute
to my inability to describe it well.
I have an MDI application that opens every MDI child form maximized.
These child forms generally contain a DataGridView control with the
associated Binding Navigator at the top of the form. The navigator is
anchored Top,Left, and the DataGridView is anchored to all sides.
When the form opens, the DataGridView does not fill the entire form,
rather there is a line about 1/2 inch from the bottom of the
application window. If I resize the application window at all, the
deformity goes away and my form looks as it should.
How can I get my form to appear as it should when first displayed (with
the DataGridView filling up the whole form except for the Binding
Navigator)?
Thanks,
Rod Early Tag: Down Load Manager Tag: 102962
Really annoying Invalid Resx file when building app
Hi,
I am getting a really annoying Invalid Resx file when building the app.
This is happening in a class library DLL form that references a
DataSet in the same assembly. If I exclude the form from the project,
build the project, include the form, open it up in the designer, then it
will work again. Any ideas why this is happening?
Here is the exact error. TIA.
Error 1 Invalid Resx file. Could not load type MyCLassLibrary.MyDataSet,
MyCLassLibrary, Version=3.5.16.3, Culture=neutral,
PublicKeyToken=7d84ad99feecd433 which is used in the .RESX file. Ensure
that the necessary references have been added to your project. Line 271,
position 5. C:\MyCLassLibrary\Windows\MyForm.resx 271 5 MyCLassLibrary Tag: Down Load Manager Tag: 102961
Rendering super/subscript text
I was wondering if anyone has come across the problem of needing to render
text as partial subscripts and super scripts. Meaning that I have a control
with text displayed and I want parts of the text to be superscript. Think
chemical formulas or mathematical equations. I was going to look at using
some kind of markup to tell the renderer to use the script version of the
font. I was just wanted to see what other folks have done before I go about
inventing a wheel.
Thanks.
Brian Tag: Down Load Manager Tag: 102960
MouseMove & BorderStyle
I just encountered a strange behavior of a custom control compiled
with .NET 1.0 and used from .NET 2.0: If the newly inherited property
BorderStyle is set to Fixed3D, the coordinates returned by MouseMove
have an offset of 2 pixels (the border thickness), i.e. (2,2) is
returned for the upper left pixel of the client area.
I think the coordinates should be relative to the client area.
Indeed, a test control created with .NET 2.0 returned (0,0) for
the upper left pixel of the client area when using Fixed3D.
Did anyone experience this before? It looks like a bug,
but of course, I might be doing something wrong. Tag: Down Load Manager Tag: 102959
Barcode.dll for .NET released
The new version of Barcode.dll is available.
Barcode.dll is a powerful .NET component for creating barcode images.
You can easily integrate barcodes with your application using any .NET
language.
It supports most barcode sybologies (Code39, Interleaved 2 of 5, Code
128).
It includes:
- ASP.NET WebControl
- WindowsForms control
For detailed information please visit:
http://www.lesnikowski.com/barcode/
Online demo is available at:
http://www.lesnikowski.com/barcode/demo.aspx
--
http://www.lesnikowski.com/ Tag: Down Load Manager Tag: 102955
Get Assembly version
Hi,
Does anyone know what the simplest way to retrieve the version number
of a referenced DLL is?
Thanks for all the help....
Dinu Tag: Down Load Manager Tag: 102947
Double Buffer panel within SplitContainer to avoid TreeView flicke
I have a treeview derived control placed within Panel2 of a SplitContainer
control on a form. The TreeView flickers during updates so I set the
DoubleBuffered attribute to true (in the constructor of my class derived from
TreeView).
It still flickers so I was thinking that it could be that DoubleBuffered
also needs to be set within the parent panel that contains this TreeView
derived control. However, in this case, the parent is a panel that belongs
to a SplitContainer. Of course, I can't directly set the DoubleBuffered
property of Panel2 and I was wondering if there is some other way to do this
or if I'm on the wrong track altogether.
Also, I'm using C++/CLI and the tree view nodes are user-drawn, does this
for any reason automatically rule out the use of double buffering on the
related tree view?
Thanks
David Tag: Down Load Manager Tag: 102944
Need help with ContextMenuStrip in a DataGridView
I want to offer the possibility for the user to right click a row in a
DataGridView (Where the selection mode is set to entire row) and make a
ContexMenuStrip object appear. This works well setting the ContextmenuStrip
on the DataGridView (to avoid the weight of setting one for every row) but
I'd like also for the underlying row to become selected. I tried to control
the mouse events but that led nowhere. Anybody did this before or is it even
possible ?
We cna see this reaction in different software including Microsoft's mmc
console so I must be missing something (and probabely a very simple something) Tag: Down Load Manager Tag: 102941
Question about fetching a GIF image from assembly
I use reflection to get a GIF image that contains a transparency
mask (the white background should be transparent) that is
part of my C# project build. The problem is that the image's
transparency property disappears when I render it making
it look as if were a JPEG image.
The code I use is:
Assembly assem = this.GetType().Assembly;
Stream streamTransPic =
assem.GetManifestResourceStream("MyProject.images.transPic.gif");
transPic = System.Drawing.Image.FromStream(streamTransPic);
It is rendered with Graphics.DrawImage method in
gObj.DrawImage (transPic, rect);
where gObj is an instance of Graphics and rect has already been
defined.
If I read the image from a file rather than storing it in the compiled
assembly, its GIF transparency property is present when I render
it. But I don't want to use separate data files with production code. Tag: Down Load Manager Tag: 102936
How to add/remove functionality to propertygrid?
hi all,
If you add a tabcontrol on the form in VS ide, at the bottom of
properties window you can see some links that with them you can
add/remove tabs to/from tabcontrol.How can we do this with ordinary
PropertyGrid?to better ask the question how do we subclass it?
Thanks in advance
Behzad Tag: Down Load Manager Tag: 102933
How could I achieve this?
Hi all,
I'm relatively familiar with vb.net using Visual Studio, although
concentrate more on asp.net apps than windows apps...
I would like to create a small app with a "explorer" like panel which can
contain icons for a number of items in my own collection class.
I would also like to be able to right-click and have a series of options
available for each of these.
Can anyone point me in the right direction, supply me a few keywords to look
up on the net etc...
Any help would be most appreciated.
Regards
Rob Tag: Down Load Manager Tag: 102932
access the calling user's config info from a dll?
Hi,
I am using C#. My WinForm project has a config file created by VS2005
containing some user scoped properties. It has setup as the config file as
follows:
<userSettings>
<MyNameSpace.Properties.Settings>
<setting name="MyProperty" serializeAs="String">
<value>"aaa"</value>
</setting>
</MyNameSpace.Properties.Settings>
</userSettings>
I can easily access the property value in a type-safe manner in my WinForm
via:
Properties.Settings settings =
MyNameSpace.Properties.Settings.Default;
MessageBox.Show(settings.MyProperty);
My WinForm uses some BO's from a dll. How can I access the config properties
from within the dll?
The class which contains the property specification is marked internal to
the WinForm exe.
I have read the helptext regarding ApplicationSettingBase and
ConfigurationManager classes. These are both new with .Net 2.0, so they most
be both current technologies. Neither sections of helptext refer to the
other. I can't understand what job each of them are trying to do, or how
they relate to each other.
If one wants to access the calling user's config info from a dll, which
facility should I be using?
thanks
Barry Mossman Tag: Down Load Manager Tag: 102931
crystal reports
Why would using crystal reports run fine from one pc but not anpther? I
disabled filewalls, had admin rights, selected the install prerequsits. I
get a log in screen that won't accept any login. Logged in as the same user
from another pc, it works fine. It seems on the pc that worked a warning
run app screen came up that didn't come up on the one that failed. This
makes me think something is stopping the crystal reports viewer form
installing correctly?? the viewer does come up though, but it cant connect
to the database. Tag: Down Load Manager Tag: 102930
Using Microsoft Chart Control in dotnet
I am trying to use the Microsoft Chart Control COM component in dotnet 2.0
but keep getting "class not registered" exceptions when I try to run the
code. I have done the following so far to try and get around this issue:
- registered mschart20.ocx using "regsvr32 mschrt20.ocx"
- registered AxInterop.MSChart20Lib.dll using regasm
- registered Interop.MSChart20Lib.dll using regasm
- reinstalled Office Web Components 2003
Unfortunately, none of these has made any difference. More or less, I am
doing the following with my code:
- create new project
- add Microsoft Chart Control 6 reference (listed in COM object list)
- drag a Microsoft Chart Control 6.0 (SP4)(OLEDB) to my form
- Try to run the code - class not registered exception is thrown every time
Does anyone have any ideas?
Using DotNet 2.0 with VS 2005 on Windows XP 64-bit currently.
Bob Dankert Tag: Down Load Manager Tag: 102928
How to make asynchronous call ?
Hi all,
First, I use C# with the .NET Framework 2.0.
I would like in the method OnButtonClick, call the method A.DoSomething but
in a way that executes after
OnButtonClick has finished its execution.
I am looking for something like a PostMessage in Win32 in fact.
How can I do that in C# ?
Class A
{
// may be inheriting from Form too
void DoSomething() { }
}
Class B : Form
{
void OnButtonClick() // for example
{
// call A.DoSomething but do not execute yet
return;
// now it is the time that DoSomething must execute
}
}
Thank,
Laurent Tag: Down Load Manager Tag: 102927
.Net: File copy control
Hi,
I'm looking for a Windows Forms Control to copy files and direcotries
between two directories.
|-----| |-----|
| | <- | |
| | | |
| | -> | |
|-----| |-----|
What I've found up to now:
System.Windows.Forms.OpenFileDialog
System.Windows.Forms.SaveFileDialog
System.Windows.Forms.ForlderBrowserDialog
As the names state these are dialogs and not simple controls, and thus
cannot be arranged like the schema shown above.
Microsoft.VisualBasic.Compatibility.VB6.DirListBox
Microsoft.VisualBasic.Compatibility.VB6.DriveListBox
Microsoft.VisualBasic.Compatibility.VB6.FileListBox
Is it a good idea to use VisualBasic controls in a C# application?
These controls don't look really nice and they don't really satisfy the
schema shown above (z.B. FileListBox only shows files, no directories.).
http://www.windowsforms.net/ControlGallery/default.aspx?Category=6&tabindex=5
http://www.codeproject.com/
These sites have some interessting controls. Can someone recomment one of
these controls? Or dissuade from one? The controls should be usable in a
professional commercial application (license, stability,
internationalization, use system icons,...).
Other recommendations?
Thanks.
-Puce Tag: Down Load Manager Tag: 102926
Greetings!!
Can any one guide me in developing an application that will overrides
internetexplorers IDownloadMananager .