|
I have a whiteboard measure 77 x 100cm and i used picturebox in vb6 to be my whiteboard on software side.Can anyone help me to make the picturebox scale the same as my whiteboard in vb6 because i dont know how to scale it.
|
|
|
|
|
You know the area available for the PictureBox .
So a little simple math will provide you with the answer.
1. obtain a Scale Factor by dividing the width of your area by the width of your whiteboard (770mm), or the height of your area by the height of the whiteboard (1000mm)
2. the width for the PictureBox will be 770 * the Scale Factor from above.
3. the height will be 1000 * the Scale Factor.
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.”
I wouldn't let CG touch my Abacus!
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
|
|
|
|
|
Further th what Henry says; if you want the picture to remain proportional then only apply the lowest of the 2 scale factors to both the Height and Width.
|
|
|
|
|
how to communicate with picturebox and toolbar..i want to drag n drop the icon in toolbar to picture box in same form but doesn't work, like icon rectangle and i should can control the rectangle box(resize)
|
|
|
|
|
What have you tried?
Please show the code that is not working, so that people can see where you are going wrong.
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.”
I wouldn't let CG touch my Abacus!
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
|
|
|
|
|
Hi;
Does anyone know of any decent VB Source Code examples for the formatting of HTML. I am looking for something that will take Html input and reformat it reasonabbly correctly, adjusting all indents, line breaks and tag captialisation / decapitalisation.
I have searched and searched and found very little, and have come to learn (through exploding head syndrome) that this task is not as easy as one might initially think!
I would also be interested in any freely distributable .NET API's (except HTML Tidy) that anyone may know about.
Any guridance would be appreciated.
Regards
Dave
|
|
|
|
|
A quick google search reveals http://www.manoli.net/csharpformat/[^] which is c# not VB. But it shouldn't be too hard to do a translation from one language to another. It might at least give you a starting point for how to go about it.
|
|
|
|
|
Hi Dave,
This may not be of any help but have you checked the formatting in Visual Studio. You can reformat your HTML in Visual Studio using the shortcut "Ctrl+E, D" or via the menu bar Edit, Advanced, Format Document.
You can change the way your document is formatted by going to the menu bar Tools, Options, Text Editor, HTML.
It's not source code but it may help.
"You get that on the big jobs."
|
|
|
|
|
I read your reply and was about to point out to you that you had mistyped your shortcut suggestion. Luckily I checked first. I have always used Ctl+K, D.
Nice to learn something new.
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.”
I wouldn't let CG touch my Abacus!
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
|
|
|
|
|
Ctl+K,D is still good in the Macro IDE. The other day I was playing with my macros and going Ctrl+E,D "bing" Ctrl+E,D "bing" ??? uhh, had to rediscover Ctrl+K,D.
For the life of me I couldn't remember using it. Shortcuts you do without thinking.
"You get that on the big jobs."
|
|
|
|
|
I have Visual C# Express and the suggested shortcut is Ctlr+E, D .
However I just tried the following:
Ctrl+E, Ctrl+D which works
Ctrl+K, Ctrl+D which works, and
Ctrl+K, D which does not work.
I must get a clever new signature for 2011.
|
|
|
|
|
I always thought Ctrl+E, D was shortcut notation for shortcuts. But you're right, even though Ctrl+E, D works the same as Ctrl+E, Ctrl+D , they are in fact, different shortcuts. Ok, I didn't know that.
"You get that on the big jobs."
|
|
|
|
|
My goof.
I meant Ctl+K, Ctl+D. i.e. keep ctl pressed for both keys.
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.”
I wouldn't let CG touch my Abacus!
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.
|
|
|
|
|
Hi
I am using one activex component on my project. i want disable double click option this activex component in run time.
Please give any idea or url
Regards,
M.Mathivanan
|
|
|
|
|
Unregister the corresponding double-click eventhandler;
There's some code that gets executed on double-click - that must be an eventhandler. Unregister that one, and the code won't be executed.
I are Troll
|
|
|
|
|
If the double-click event has been wired up in your code (possibly done by the designer), then you just need to use RemoveHandler to remove it. If the control handles its own double-click event without any intervential from your code, you cannot disable the double-click event. You'd have to modify the code in the ActiveX control in order to do that. If you don't have the source code for it, you're out of luck.
|
|
|
|
|
Private Const WM_KEYDOWN = &H100
Private Const WM_KEYUP = &H101
Private Const VK_BACKSPACE = &H8
Private Overloads Shared Function SendMessage(ByVal hWnd As IntPtr, _
ByVal msg As Integer, ByVal wp As IntPtr, ByVal lp As IntPtr) As IntPtr
End Function
SendMessage(windHandle, WM_KEYDOWN, CType(VK_BACKSPACE, IntPtr), CType(&HC0510001, IntPtr))
SendMessage(windHandle, WM_KEYUP, CType(VK_BACKSPACE, IntPtr), CType(&HC0510001, IntPtr))
Need help with this one! Its not working...
Thank you!
|
|
|
|
|
FeRtoll wrote: CType(&HC0510001, IntPtr)
the hex constant does not conform to the documentation[^], at least bits 31 and 30 are wrong.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Luc Pattyn wrote: the hex constant does not conform to the documentation[^], at least bits 31 and 30 are wrong.
so what should i do?
if you know how can i solve the problem please tell me!
thank you!
|
|
|
|
|
solved it... it was my fault! my function didnt fireing because of some crazy old code boolean!
so if anyone ever need this the above sendmessage works fine for backspace!
sorry guys
|
|
|
|
|
Hi,
I'm currently working on a project for my company that requires the extraction of specific data from a web-interface and put it onto an excel spreadsheet. The page on the web-interface refreshes every several seconds as new data comes in. I'm trying to write a code in Excel Visual Basic that will automatically extract specific data/information continuously as new data comes in. Since I'm new to Visual Basic I'm not really sure how to do that. I've been searching online to find any references or info on how to do that but have not been successful.
Can anyone help please?
thank you
|
|
|
|
|
Ahmed Eastlink wrote: Since I'm new to Visual Basic I'm not really sure how to do that.
Start with learning VB before you use it. If you need to learn while on a project, both the learning and the project won't be going swell.
Ahmed Eastlink wrote: I've been searching online to find any references or info on how to do that but have not been successful.
Search again, with the keywords "VB.NET fetch website" (that's one part of your request) and "Write Excell VB.NET" (the second part)
Then try to combine both examples into a solution. If you get stuck somewhere, check back here with a dump of the relevant source-code.
I are Troll
|
|
|
|
|
Hi,
Normely I use a Folderbrowserdialog for selecting a folder.
Thrue the api
Public Type BROWSEINFO
hOwner As Long 'Handle to the owner window for the dialog box.
pidlRoot As Long 'Address of an ITEMIDLIST structure specifying the location
'of the root folder from which to browse. Only the specified
'folder and its subfolders appear in the dialog box.
'This member can be NULL; in that case, the namespace
'root (the desktop folder) is used.
pszDisplayName As String 'Address of a buffer to receive the display name of the folder
'selected by the user. The size of this buffer is assumed to
'be MAX_PATH bytes.
lpszTitle As String 'Address of a null-terminated string that is displayed above
'the tree view control in the dialog box. This string can be
'used to specify instructions to the user.
ulFlags As Long 'Flags specifying the options for the dialog box.
'See constants below
lpfn As Long 'Address of an application-defined function that the dialog box calls
'when an event occurs. For more information, see the
'BrowseCallbackProc function. This member can be NULL.
lParam As Long 'Application-defined value that the dialog box passes to the
'callback function (in pData), if one is specified
iImage As Long 'Variable to receive the image associated with the selected folder.
'The image is specified as an index to the system image list.
End Type
and all needed dll imports I can have a textbox
the flag BIF_EDITBOX activate ordéactivate the textbox.
Can I do this with a build-in control
Jan
|
|
|
|
|
Use a FolderBrowserDialog : MSDN[^]
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Digital man: "You are, in short, an idiot with the IQ of an ant and the intellectual capacity of a hose pipe."
|
|
|
|
|
I fail to see where I can activate the textbox
|
|
|
|