I have to write a program, in vb.net 05, that does some clean up. The desired time for the program to run is when the user logs off and the computer begins the shutdown process. I realize I could probably use "Scheduled Tasks" to run the program at log off/shut down, but I'd like to use the registry to execute the program at logoff/shutdown.
I've got the guts of the program already written, I just need to figure out how to write to the registry to run at logoff/shutdown. Any help is appreciated!!!
Despite a signifigant amount of research I have yet to be able to crack this one: I Need to be able to adjust the amount of items displayed in the listbox of the combobox - i.e. sometimes 4, sometimes 24, sometimes in between. I've noticed the windows API has a CB_SETDROPPEDWIDTH - but cannot find an equivilant for height (CB_SETITEMHEIGHT sets individual item height - doesn't adjust the listbox size). If it cannot be done through API calls (and i'm beginning to think it can't) then how? If it needs to be painted I would appreciate a brief example if possible?
ComboBox1.MaxDropDownItems should work in vb.net, in vb6 there is not a corresponding function, and in the api there is only a function to find out what the size and position of the dropdown CB_GETDROPPEDCONTROLRECT. You might look into creating a custom control in vb.net expose it to com and use it in your vb app.
Sorry I don't have anything more concrete, maybe someone else does.
I've got a webpage that has a selfmade webusercontrol.
That webusercontrol dynamically creates (at this moment only) a label control, a calendar control and a textbox control, depending on how many items I give the control through a Session.
So far so good, for every item in Session a set of these controls is created and added to the page.
They display nicely.
*I hear the collective going "BUT?"*
Ah yes, there's a "but".
What I want to do, is fill the textbox of a set with the selected date of the calendar object of THAT set.
But there are (in this example) two calendar objects.
NOTE: (I have to add the calendar objects dynamically as I don't know how many date type parameters will be required in the near future)
How can I get the selectionchanged event from one of the calendar, so that the control "knows" it's from that calendar and fill the correct textbox that belongs to that calendar ?
Don't forget, all the controls are being generated at runtime in a webusercontrol, which means that somehow I have to create dynamic eventhandlers that "knows" which calendar object had the selectionchanged event and "knows" which which textbox object to set the text of.
Code in VB.NET please, not ASP.NET.
Everything is being done in the code behind, which is VB.NET.
Some help would be greatly appreciated.
If I use a withevents declaration, I end up with only one calendar on the resulting page.
Seems as though it overwrites the first one.
Perhaps because it uses a global identifier within the control instead of one contained in a sub?
The quickest fix I can think of is a hashtable. Use the calander object as the key and the textbox will be the value. Declare the hashtable globally and when you create a new 'control group' add the new value.
dim hash as new hashtable
'In the SetCalander method
'In the selectionchange event
'This will give you a reference to the appropriate textbox
dim txt as textbox = hash(sender)
This should work. It may not be the best solution but it was the quickest fix I could think of.
I have a windows application and I need to show some pictures that stored in the server. PictureBox could not show these files and I tried impersonation. But it still throws exception saying 'Unauthorized user'. How can I make the picture box show these images? Thanks a lot...
(I have to write image address like; 'http://server/images/image.jpg'
Ahhh, ok. Well in that case the IIS is most likely what is preventing you from accessing the location. You will either need to adjust the permissions of the directory or IIS in order to get this to work.
Last Visit: 31-Dec-99 19:00 Last Update: 30-Jan-23 4:06