|
It's a very brief overview, but it's a decent place to start.
|
|
|
|
|
ymilan wrote: So there is no way to just set the form to be writable off the bat?
There is simply no such thing. If you want to move controls around on the form at run-time, you have to write the code that provides such functionality. It is NOT built into the Form, nor anywhere else in the .NET Framework.
|
|
|
|
|
Ok, now I've read many tutorials and examples of mousemove, dragenter, and dragover. The main problem right now that I'm having is I'm trying to move a picturebox array. I keep getting compiler errors that value of type system.drawing.image is not a valid member or type of picturebox array.
I've looked up on MSDN the properties of pictureboxarray and it does show dragenter, dragover, and mousemove. However, I'm not finding any examples of how I can use the picturebox array to move the images I have on design view.
In VB6, all I had to do is set oledragdrop to true and it worked.
Any ideas on where or how I should accomplish this is much appreciated.
Hopefully I'm explaining a little bit better now. Thank you for your expertise.
|
|
|
|
|
you could try to use pecture box. me.picturebox.image = directry of the image, play around on how to justify the size of the image to fit in the piturebox
|
|
|
|
|
Hi,
Another problem of mine.
I run a process(say a calculator) from a button click. Now I want to resume(do nothing/disable) the form till the user finishes the process ie till he closes the calculator.
I am using waitforexit like below(not the exact code)
dim p as new process
p.startinfo="calc"
p.waitforexit()
p.start()
It works fine,.But sometime it gives an error in the line(p.waiforexit) saying that p has not been allocated any process (not the exact error, but with similar measning)
Please help me
Thanks in advance
|
|
|
|
|
This is because your Waiting for the process to exist before you start the process! You can't wait for something to exit if it doesn't exist yet! Switch those two lines around and it'll work.
|
|
|
|
|
thanks for your reply
i think u r mistaking me.
its waitforexit not exist...
|
|
|
|
|
himangshu123 wrote: i think u r mistaking me.
No but you are mistaking him.
Dave Kreskowiak correctly pointed out that your code waits for exit before it starts. It should start and then wait for exit;
p.waitforexit()
p.start()
switch those two lines round then all should be well.
Incidentally in your OP you stated that the code you posted was not the exact code, and the error message was not the exact error message. In this case it doesn't seem to have made any difference, but you really should (particularly for error messages), give the exact wording.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
oh apologise me...
my mistake...
actually I have done the same...i didnt cut copy the code so that mistake came...sorry...
please help me
|
|
|
|
|
|
sorry....
code is
dim p as new process
p.startinfo="calc"
p.start()
p.waitforexit()
this was my actual code
still the problem arise
|
|
|
|
|
Next time, copy and paste the code. Don't retype it from memory. You'll get the order of statements wrong and quite possibly not convey some minor detail that makes all the difference to whether your code runs or not.
Between the call to .Start and .WaitForExit, add the line p.WaitForInputIdle() . This will force your code to wait for the app to start.
|
|
|
|
|
Hi to All,
Here is an another problem of mine.I am using vb.net2005.
I want to maximize the form so that user can not access the taskBar. I got some code,to hide the windows task bar. But when I run another process(say calculator) from my application, the taskbar reappears.
So I was wondering if any method or property is there to maximize the form so that, the form comes top of the task bar itself....
Please suggest a way
Thanks in advance
|
|
|
|
|
|
hi to all
Could anyone please tell me how to block certain drives to be accessed while looking for sub directories and files.
(All I want is to give an environment to the user so that HE CAN LOOK FOR FILES IN A DIRECORY, WHICH ALSO MAY HAVE SUBDIRECTORIES). The tool I am using is dirListBox in vb.net2005.
But my problem is that user can go to all the files and directories in the computer. (i WANT HIIM TO ACCESS THE FILES AND FOLDER OF A SPECIFIED DIRECTORY ONLY, SAY INSIDE C:\AA)..
NOW HOW TO FILTER THE DIRLISTBOX,?
please advice me if any other method is there for the same...(not necessary to be the DirListBox control)
THNAKS IN ADVANCE
|
|
|
|
|
himangshu123 wrote: The tool I am using is dirListBox in vb.net2005.
There is no "DirListBox" in VB.NET. Are you talking about the OpenFileDialog or are you using the old DirListBox from the VB6 days?? The old DirListBox could not be filtered or limited to a group of folders.
|
|
|
|
|
thanks for the reply
ok can openfiledialog be make to show or start from a particular directory? User shouldnot be able to view others
|
|
|
|
|
Have a read through the members of OpenFileDialog, in the MSDN documentation. It should be fairly easy to find the correct solution.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
The OpenFileDialog class is a wrapper to call the Win32 function OpenFile (? I can't remember which the function name exactly!). Win32 displays the dialog, not the .NET class OpenFileDialog.
OpenFileDialog is also a sealed (NotInheritable) class, so you can't really modify it at all. You can't even get the window handle to the dialog and start throwing messages at it since your code stops running when you call the dialogs .ShowDialog method.
Your going to have to write your own dialog to support this. It would just be a simple Form with a TreeView for a directory browser, and a ListView for files in the currently selected directory. Oh, and of course, a couple of buttons for Open and Cancel.
|
|
|
|
|
Hello every one,
I am having a VB.net 2005 application.
Earlier we had designed the application with a fixed window size, now we had implemented TableLayoutPanel in it to make it full screen.
After the implementation I made Windowstate as maximized for the forms. Now I am encountering some thing strange,
On formName.show first the form1_activate is executed instead of form1_load.
(Openinf form1 from form)
Once I reverted back “Windowstate to Normal” the execution sequence comes back to normal (Lode and then execute)
Can any one plz help me out with it...
Regards
Nishkarsh
|
|
|
|
|
You can't change the firing order of events, so the only thing you can do is change your code to handle both cases. I have to question what code you're putting into the Activate event handler, since this event fires every time the form gets focus for any reason, not just when the form first appears. Normally, you'd use this event to update the forms controls with new data when the form regains the focus.
|
|
|
|
|
Thanks Dave for the input. My exact question is that after making The window state to full screen in designer, why form activate is executed before load.
I had done a way around now that i change the window state to full screen at the end of form load. But want to know why way it happening
Regards
Nishkarsh
|
|
|
|
|
|
Can anyone help to generate a PRINT PREVIEW of a sales report from SQL 2000 database and group by INVOICE NO. With INVOICE SUB TOTALS. THANK YOU
|
|
|
|
|
Through VB.NET, or do you just want a report?
If the latter is the case, then simply install Microsoft Access. Link the SQL2000 tables to the Access-database, open up the report-wizard and enjoy
I are troll
|
|
|
|