|
msandhyar wrote: i need to include files in it
how can i chaange the code so as to reflect the changes done to the path at install time of the application
how to include those files
What do you mean by include the file in it? Please give more detail information relate to your question.
|
|
|
|
|
i want to include some image files in my project
i want those files to be in the same folder as the project
and i want the path of the files to change as and when the user changes the path at the install time of the project
or to say in other words, how can i modify the file location code so as to be able to access it even if the user changes the path at install time
i want to package them as a whole
msandhyar
-- modified at 14:07 Sunday 30th April, 2006
|
|
|
|
|
hello I laid out on my form two labels which post the contents of my variables (just to help me debugging). I would like to reveal or to hide those labels using a combination from keys (like : ctrl + HDE) while the application runs. Do you know a way for doing this?
scalpa
|
|
|
|
|
First step is to set the forms KeyPreview property to True. Then, handle the keypress event with something like this:
Private Sub Form1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles MyBase.KeyPress<br />
If e.KeyChar.Equals(Chr(8)) Then 'press Ctrl H<br />
Label1.Visible = False<br />
e.Handled = True<br />
ElseIf e.KeyChar.Equals(Chr(21)) Then 'press Ctrl U<br />
Label1.Visible = True<br />
e.Handled = True<br />
End If<br />
End Sub
This code will hide the label with Ctrl H, and show the label with Ctrl U.
Roy.
|
|
|
|
|
Thanks a lot Roy It works fine...
I learned something new today.
So it's a good day !
pascal
|
|
|
|
|
well, i'm not sure abt what are you asking abt but if i understood you , i think you want to use shotcuts to show or to hide labels
well , this is a event named "keydown"
i will write some thing here but this is not the right code cuz i don't remember all
this methode accepts two parametrs the first code : is to recuperate the ascii code of the button you taped at
& shift do the same thing but just for Ctrl & shift
you can know the ascii code of the button you taped by showing the parametre code in a textbox
private sub form_keydown(code ,shift)
textbox1.text = code
end sub
when you know it just change the code in the methode
private sub form_keydown(code ,shift)
if code = .... and shift = .... then
label1.text = ....
end if
end sub
end sub
it is hard to explain just in the furom
i hope you understood ma english
ciao
try to be good if you can't be the best
|
|
|
|
|
thanks for your help
quisnam igitur sanus ?
|
|
|
|
|
Dear Friends,
I need to develope one OCR for the image which I am getting from a ORBSACN machine. the machine is generating image which is full of numbers but the image is colored. when I tried it to read with some of the ready made OCR. It is not reading the image well. Please can some one tell me the logic behind developing a OCR for any special image.
Your quick response will be highly appreciated.
Thanks
Murtuza Patel.
|
|
|
|
|
|
first thank u all
1- i need the way to call a report created in ms-access db file from a vb.net project, please show me the easiest way
2- when i make a report in a vb.net project (crystal report), the report works fine but it does show all data, and no code or procedure i do to filter the data and view just (ie: by date or name ), seams to work with me
please help me and i'll be greatfull
i must say that i am new to vb.net
thanks in advanced
baahmada
|
|
|
|
|
hello to all
i have 400 "tiff" tagged image files (scanned document), i want to print the necessary files out to 400 in one click in vb.
and
i am using datareport,
when i showing report only previous status of record only s
appears with out recent but in table the data are stored with recent changes
datareport cant be refresh
how i slove these problem
pls help me give solution for this
thanking u
sdgsdfsdfsdfsdfsdfsdfsdfsdfsdfsdf
-- modified at 7:26 Monday 1st May, 2006
|
|
|
|
|
I have a listview control populated by a txt file, I would like to know how to change the value of all the subitems at the one time in one column only.
ie: all the column values are in dollars and I need to change all the values by adding 10% to all subitems. Damm tricky little problem this one. Sure hope you can help
FastTaxi
|
|
|
|
|
You are going to have to loop through each item in the listview and update the subitems that need to be updated
dim item as ListItem
for each item in listview.Items
item.subitem(subitemNumber) *= 1.10
next
Mike Lasseter
|
|
|
|
|
hello,
please tell me how can i add properties to the user created control
as i have a treelistview control & i want to add focusednode property to it.
can u help me.
|
|
|
|
|
PUBLIC CLASS TopVaultNode
INHERITS TreeNode
PUBLIC Type AS STRING
PUBLIC NodeId AS GUID
PUBLIC ParentId AS GUID
PUBLIC Description AS STRING
PUBLIC UserRights AS INTEGER
SUB NEW(ByVal XType AS STRING, byval XNodeId AS GUID, XParentID AS Guid, ByVal XDescription As String, XUserRights AS INTEGER)
MYBASE.NEW()
ME.Type = XType
ME.NodeId = XNodeId
ME.ParentId = XParentId
ME.Description = XDescription
ME.UserRights = XUserRights
ME.ImageIndex = NodeColorsAndIndexs.imageindexes.VAULT
ME.SelectedImageIndex = NodeColorsAndIndexs.SelectedImageIndexes.VAULT
ME.ForeColor = Color.Black
ME.Text = Trim(ME.Description)
END SUB
END CLASS
|
|
|
|
|
hellow to all ..
i have some CR files that i would like to print them all in one click , anyone have ideas ?
thxx
|
|
|
|
|
Hello,
Please help Me to write a Vertival Text In Graphic Mode.
i wrote this code:
<dim grfx="" as="" graphics="CreateGraphics()
grfx.DrawString("Legend"," new="" font("arial",="" 16.0,="" fontstyle.bold,="" graphicsunit.point),="" brushes.tomato,="" 20,="" 70)="">
this code write "Legend" in horizantal direction, but i want to write it in vertical direction, i don't want to show it as:
L
e
g
e
n
d
Thank you
Devil
software Engineer
|
|
|
|
|
Try applying a RotateTransform to the Graphics object.
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
thank you so much
Devil
software Engineer
|
|
|
|
|
What I am trying to do is take an Image (either in the picture box or a saved bitmap) and resize it to my fixed dimensions. Having some trouble with it and the snippets that I've been looking at aren't really helping.
Thanks in advance
._._._._._.-.-.-.-.-._._._._._.-.-.-.-.-._._._._._.-.-.-.-.-
SicherGrenzen
clean and elegant
|
|
|
|
|
Well, first load the Image and then use the GetThumbNailImage Method to resize it. So, if your Image object is named img , then,
resizedImage = img.GetThumbNailImage(width, height, Nothing, IntPtr.zero)
Specify the Width and Height in Pixels, and you'll get your New Image in resizedImage with that height and width.
Hope this helps.
Yuvi Panda T
Microsoft Student Partner
Blogs at : http://yuvipanda.blogspot.com
|
|
|
|
|
hai there,
i had made a project on wallpaper changer, and it is working very well.
the code
PictureBox6.Image = img5.GetThumbnailImage(117, 121, Nothing, Nothing)
will made the picturebox as thumbnail of the size demanded.
and if you wnat to make the size of the picture according to the resolution ofthe desktop than check this out....
private static void ConvertSourceFileToBmp(string sourceFilePath, string tempBmpFilePath, ScaleStyles scaleStyle, Color backColor)
{
Image sourceImg = Image.FromFile(sourceFilePath);
if (scaleStyle != ScaleStyles.BestFit)
{
sourceImg.Save(tempBmpFilePath, System.Drawing.Imaging.ImageFormat.Bmp);
}
else
{
//get the dimensions of the screen
float H = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
float W = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
//get the image dimensions
float h = sourceImg.Height;
float w = sourceImg.Width;
//dimensions of target
float targetHeight = -1;
float targetWidth = -1;
//find the appropriate height and width
if (H / h >= W / w)
{
targetWidth = w;
}
else
{
targetHeight = h;
}
if (targetHeight == -1)
{
targetHeight = (H / W) * targetWidth;
}
if (targetWidth == -1)
{
targetWidth = (W / H) * targetHeight;
}
//create a new image with the default back color with the scaled dimensions w.r.t. image and screen
Bitmap bmpImage = new Bitmap((int)targetWidth, (int)targetHeight);
Graphics g = Graphics.FromImage(bmpImage);
SolidBrush backgroundColorBrush = new SolidBrush(backColor);
g.FillRectangle(backgroundColorBrush, 0, 0, bmpImage.Width, bmpImage.Height);
//layout this image in the center
g.DrawImage(sourceImg, Math.Abs(targetWidth-sourceImg.Width)/2, Math.Abs(targetHeight - sourceImg.Height)/2, sourceImg.Width, sourceImg.Height);
//save it as bmp
bmpImage.Save(tempBmpFilePath, System.Drawing.Imaging.ImageFormat.Bmp);
//dispose stuff
backgroundColorBrush.Dispose();
g.Dispose();
bmpImage.Dispose();
}
sourceImg.Dispose();
}
private static void SetRegistryKeyForWallpaper(string keyName, string value)
{
RegistryKey deskTopKey = Registry.CurrentUser.OpenSubKey(@"Control Panel\Desktop", true);
deskTopKey.SetValue(keyName, value);
deskTopKey = null;
}
if this could'nt help you,plz let ne know your problem in detail,and what actually yo want to do.
waiting for ur reply...
bhanwar
bhanwargupta@gmail.com
|
|
|
|
|
Thanks for the replies that I recieved. While they helped inresizing the image it wasn't really what I was looking for. I wanted the image resized then saved as the new size. The two snippets suggested simply resized the view of the image. I did, however, find this bit of code which worked nicely after I tailored it a bit.
Dim syspath As String<br />
syspath = Environ("systemroot")<br />
<br />
Dim bm As New Bitmap(picLogo.Image)<br />
<br />
Dim myX As Integer<br />
<br />
Dim myY As Integer<br />
<br />
myX = Val(148)<br />
<br />
myY = Val(119)<br />
<br />
Dim thumb As New Bitmap(myX, myY)<br />
<br />
Dim g As Graphics = Graphics.FromImage(thumb)<br />
<br />
g.InterpolationMode = Drawing2D.InterpolationMode.HighQualityBicubic<br />
<br />
g.DrawImage(bm, New Rectangle(0, 0, myX, myY), New Rectangle(0, 0, bm.Width, _<br />
bm.Height), GraphicsUnit.Pixel)<br />
<br />
g.Dispose()<br />
<br />
<br />
<br />
thumb.Save(syspath & "\system32\oemlogo.bmp", _<br />
System.Drawing.Imaging.ImageFormat.Bmp)<br />
<br />
bm.Dispose()<br />
<br />
thumb.Dispose()<br />
<br />
Me.Close() 'exit app<br />
If someone knows of a cleaner/smaller way of doing this feel free to suggest it
._._._._._.-.-.-.-.-._._._._._.-.-.-.-.-._._._._._.-.-.-.-.-
Spimoles.NET
clean and elegant. a beautiful craft
|
|
|
|
|
I've been trying to translate the WM_KEYUP messages returned from the callback of a SetWindowsHookEx keyboard hook.
Whilst most examples I can find on the net are in C++, I'm having a hard time finding / converting this into VB.
I have the API declarations for the ToAscii, GetKeyboardState etc., just need a ready to go piece of code to paste into my application.
Thanks in advance
Code snippet attached of the callback ...
Private Function KeyboardCallback(ByVal Code As Integer, ByVal wParam As Integer, ByRef lParam As KBDLLHOOKSTRUCT) As Integer
If Code >= 0 Then
If wParam = WM_KEYUP Then
'I need to translate the lParam.vkCode and lParam.scanCode into ascii or something useable for a few keys like carriage return, backspace etc.
'32 to 127 = regular characters
'13 / 10 = carriage return in log file
'9 = [TAB]
'8 = [BACKSPACE]
'127 = [DELETE]
'other ascii codes not interested, likewise anything above 128, I don't care about
'how do I use ToAscii and GetKeyboardState ?
End If
End If
Return CallNextHookEx(KeyboardHandle, Code, wParam, lParam)
End Function
|
|
|
|
|
I am new to the vb. I am trying to do a project which have a link between a sheet of an excel document
what i want is to retrieve values from particular row/coloumn and to pass that to other
pls help me by giving suitable codes
Faithfully
Jijo thomas
|
|
|
|