|
Im not sure how you would do that but i do know of a method that would work
for putting a border of any color or thickness around a textbox.
I would use labels to draw lines and form a box around the textbox.
Select label, draw the label thin like a line.
set these properties
Text = (Nothing)
BackColor = Desired Color
Size = This will depend on vertical or horizantal, play around with the smallest number to get the desired thickness. ex. Size = 352,8 (change the 8 to a 1 to get the thinnest line possible)
Now make both a vertical and horizantal line, copy and paste each so you have 2 of each and just resize them to make a box/border around the textbox.
|
|
|
|
|
Hi,
I need print a lot of DOC, XLS, PDF, PPT files with the path in header or footer.
Thanks
|
|
|
|
|
Dim wrd As Word.Application
Dim doc As Word.document
Set wrd = New Word.Application
Set doc = wrd.Documents.Open("c:\Filename.doc")
wrd.Visible = True
'Header
wrd.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
With wrd.Selection
.ParagraphFormat.Alignment = wdAlignParagraphCenter
.TypeText "Header Text"
End With
'Footer
wrd.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
With wrd.Selection
.ParagraphFormat.Alignment = wdAlignParagraphRight
.TypeText "First Line of Footer text" & vbCrLf & "Second Line of Footer text" & vbCrLf & "Third Line of Footer text" & vbCrLf
.ParagraphFormat.Alignment = wdAlignParagraphCenter
.TypeText "Fourth Line of Footer text"
End With
'doc.Close wdSaveChanges
Set doc = Nothing
'wrd.Quit
Set wrd = Nothing
|
|
|
|
|
Does anyone know how to get rid of this database logon prompt when using crystal
reports. I am running my installed application on a client computer but it asks me
for my DB logon information everytime i run the report. Is there anyway for the report
to connect just using my connection string in my App.config file rather than prompting for DM info everytime?????????????????
|
|
|
|
|
Hi, please somebody tell me or rather explain to a novice VB6 programmer how to create a report whereby I can query it during runtime? Any help is most welcome.
THANKS!
Shiro
|
|
|
|
|
Im not familiar with VB6, just .NET
Is there any sort of parameter field feature when creating your report?
If so you will probably use that with a prompt, but like i said i dont know
anything about VB6.
|
|
|
|
|
hi there can anyone give me a hand with this i am having problems triggering an event in a set 8 hour time period from 12:00 to 8:00 for example and then during the 8 hour time gap run a small proceduer ever 10 mins any help would be great
many thanks
|
|
|
|
|
You shouldn't be using Timers this long. You can use a Timer to fire off a procedure that checks the current time with scheduled process times. This way, if your app gets shutdown unexpectedly, you won't have to calculate Timer lengths to keep your prcoesses on schedule. Your Timer should be set for once a minute or maybe even once a second, if needed.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I need to draw a dynamically generated 256x256 grayscale bitmap on screen.
Drawing it "pixel by pixel" is extremely slow. (several seconds)
Drawing it on an ofscreen bitmap and then blitting it on screen is slightly faster, but still unaceptable.
On the full framework I got around to accessing the bitmap data, and accessing the pixels directly, giving instant results.
Is there any way to achive this on the Compact Framework?
(or any other method that works...)
If the "AddressOf" worked for the bitmap, so I could get a IntPtr to it, I think I could then go in there and set the pixel data myself... But I was unable to find a way to do that.
The current code:
Dim ImgRAW(256, 256) As Byte
' GetImage(Imgraw) '... Fill up dynamic image
Dim offbmp As New Bitmap(256, 256)
For scan = 1 To 255
For x = 1 To 255
t = ImgRAW(scan, x)
offbmp.SetPixel(x, scan, Color.FromArgb(t, t, t))
Next
Next
oG.DrawImage(offbmp, 400, 100)
Hope someone can help,
Thanks.
|
|
|
|
|
Your question would be better handled in the Embedded/Mobile Forum[^]. Even though your writing your code in VB.NET, your question has far more to do with the technology supported by the Compact Framework, and very little to do with VB.NET itself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Sorry for that, I was a bit hasty when posting...
It's just that I'm trying to achive that in the last few days and am getting desperate!
I'll repost there. Thanks for the tip.
|
|
|
|
|
I have been using following code to set pixel color.Although its is coloring the pixels of picture box. But it is not coloring drawn lines on paint event.I fetch the pixel and trying to convert its color in black but drawn any line in differnet color, not able to convert in black.
Code:
On m0usemove event:-
Dim bm As Bitmap = PictureBox1.Image
xmax = bm.Width - 1
ymax = bm.Height - 1
For y = 0 To 10
For x = 0 To 10
' Convert the pixels to grayscale.
With bm.GetPixel(e.X + 10, e.Y + 10)
clr = 0.1 * .R + 0.2 * .G + 0.2 * .B
End With
bm.SetPixel(e.X + 10, e.Y + 10, Color.FromArgb(255, clr, clr, clr))
Next x
Next y
On paint event i have been using below code:
For index As Integer = 0 To 3
Dim CurrentPen = New Pen(Color.FromArgb(myAlpha, myUserColor(index)), 15) 'Set up the pen
e.Graphics.DrawPath(CurrentPen, path(index)) 'draw the path!
Next index
If any body have idea its welcomed!!
|
|
|
|
|
Your mouse event painting should be handled completely inside your OnMouseMove event. The Paint event should be used to repait your forms controls in the event that another window is passed over yours and your window need to be repainted. It should not be used to handle mouse-move based drawing.
Your previous code that you posted was a jumbled mess. There's really no way of fixing to get it to do what you wanted without re-writting the entire thing.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hye Guys
I have build a distributed application and when I deploy my components on client it works fine for the first time. but next time when I reboot the machine it gives this error..Cannot Create ActiveX Component... then I have to uninstall and re-install the component every time and on re-installing there is no gurantee that will work or not as I do it many times to run this again.
Any comments and suggestions will be highly appreciated..
|
|
|
|
|
I'm going to develop an application whcih send sms to their clients on the bassis of changes in Stock Exchange Rates after regular intervals. I also want to know about free web serives for sending sms.
Din
|
|
|
|
|
Hi,
i am trying copy complete folder to another. I want to use fileSystemObject, but when i am using that as
dim fsoTest as fileSystemObject
it is asking to declare fileSystemObject, i think i had to add some references to my project , can any one help me by telling what i had to add to my project to use fileSystemObject.
If there is any other simple way to copy complete folder, u can suggest that also.
Thanks in advance,
P.Madhu
Programmer
|
|
|
|
|
The filesystem object is part of the microsoft scripting runtime.
You can either add a reference to 'Microsoft Scripting Runtime' which will allow you to use early binding and intellisense or not bother with the reference and create it on the fly eg
set fsotest = creatobject("scripting.filesystemobject")
Jonathan
|
|
|
|
|
Hi jonathan,
Thanks for your reply, it really helped me a lot.
P.Madhu
Programmer
NSDRC
visakhapatnam-17
|
|
|
|
|
Im creating a login form for and administrator and a user. How would I make restrictions for the user using a module.
|
|
|
|
|
Your entire application has to be written with your security scheme in mind. You can't just add a little module and expect it to work. You haven't supplied any details about how you want your security scheme to work or what you need it for, so it's impossible to tell you what to do.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Well I have 4 different forms and a login form for the user and the admin. If the user logs on I want to be able to restrict them from accessing certain forms.
|
|
|
|
|
So what's wrong with checking the users access level when the user selects whatever option needed to create the new form? You'll need to check this for EVERY way to create the new forms. Or, you can even enable/disable certain controls on the form depending on the access level.
Security needs to be designed in before you even write the 1st line of code. You can't just slap this on as an after-thought and expect it to work.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i am trying to get started with some api calls in VB6.
i have found the declarations for the API calls, but don't know how to get the windows handle so that i can get the HDC to get everything else.
thank you
|
|
|
|
|
You can get windows hWnd's from the FindWindowEx API. The Spy++ utility tool installed with Visual Studio is indispensible for determining search criteria to find a specific window, because to find a child window handle you must first find it's parent window, and often the window you are looking for may be nested under several or more "generations" of parent handles.
Robert
|
|
|
|
|
You can use rwestgraham's method to get the window handle, or you can do it the easy way and just use the value that's in the form's hWnd property.
Dim windowHandle As Long
windowHandle = Form1.hWnd
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|