|
Hi I need help on how to embed or save an image and not the path of the image in a SQL2000 at 600dpi and retrieve it at the same 600dpi to display.
|
|
|
|
|
Dim Adapter As New OleDb.OleDbDataAdapter(lSql, ConnectionString)
Dim CommandBuilder As New OleDb.OleDbCommandBuilder(Adapter)
Dim memstImg As New MemoryStream
picturebox.Image.Save(memstImg, picturebox.Image.RawFormat)
Adapter.Fill(dataset, "image_bank")
Datarow = dsImg.Tables("image_bank").NewRow()
Datarow.Item("image_file") = memstImg.GetBuffer()
dataset.Tables("image_bank").Rows.Add(lRow)
Adapter.Update(dataset, "image_bank")
raj
|
|
|
|
|
how to fit the window size to the fit size an din teh middle of the screen, and i would like the window be in the middle whenever it appears on the screen.also, whenever user click on the maximize the size,the size of teh form will be full scree,i dont know how to set it.sir, plz help me.tq
|
|
|
|
|
Simple,
set form’s StartPosition property to CenterScreen
For your second question
Set form’s FormBoderStyle property to None and WindowState property to Maximized
Regards,
Chatura Dilan
|
|
|
|
|
Hi all !
I am new in program for Crystalreport. In my Report, I have two Group By : School ID, and then Class ID. I want use GroupNUmber in order to Order NUmber the Group School ID ( 1,2,3, ...) But I allway recieve the Order Number of Group Class ID.
pls help me How to resolve the problem !
Thank alot !
Example : I want the result the fowllow
1 School1 1 Class1
2 Class2
3 Class3
2 School2 1 Class1
2 Class2
3 School3 1 Class1
But Reruslt :
1 School1 1 Class1
2 Class2
3 Class3
4 School2 4 Class1
5 Class2
6 School3 6 Class1
|
|
|
|
|
Original String:
Ki KiE:สวัสดีค่ะ โปรแกรม โอเอ็มเอส โดย บริษัท เอ็มเอสแอล ซอฟต์แวร์
Problems Facing:
1. The missing '00' in the begining and trailing part of the generated string
2. The white spaces within the original string (in THAI) show up junk characters instead of SPACE.
Please check this by pasting the source code attached and help me out in generating Correct output.
thanks in advance.
Correct Output which i am expecting to generate
004B00690020004B00690045003A00200E2A0E270E310E2A0E140E350E040E480E3000200E420E1B0E230E410E010E230E2100200E420E2D0E400E2D0E470E2100200E400E2D0E2A00200E420E140E2200200E1A0E230E340E290E310E1700200E400E2D0E470E2100200E400E2D0E2A00200E410E2D0E2500200E0B0E2D0E1F0E150E4C0E410E270E230E4C
Present Output which is wrong
4B00690014004B00690045003A0014002A0E270E310E2A0E140E350E040E480E300E1400420E1B0E230E410E010E230E210E1400420E2D0E400E2D0E470E210E400E2D0E2A0E1400420E140E220E14001A0E230E340E290E310E170E1400400E2D0E470E210E400E2D0E2A0E410E2D0E250E14000B0E2D0E1F0E150E4C0E410E270E230E4C0E
Code responsible for conversion:
'-------FUNCTION CALLS -----------
Dim bytes() As Byte = ConvertStringToByteArray1(msg)
Dim str As String = bytetohexa(bytes)
'------ FUNCTION DEFINITIONS ---------
Public Shared Function ConvertStringToByteArray1(ByVal stringToConvert As String) As Byte()
Return (New System.Text.UnicodeEncoding).GetBytes(stringToConvert)
End Function
Private Function bytetohexa(ByVal bytes() As Byte) As String
Try
Dim sHex As New System.Text.StringBuilder(2 * bytes.Length)
Dim i As Integer
For i = 0 To bytes.Length - 1 Step 1
sHex.AppendFormat("{0:X2}", bytes(i))
Next
Return sHex.ToString().Replace(" ", String.Empty)
Catch ex As Exception
Return (vbNull)
End Try
End Function
One who is in search of knowledge.. should give up pleasure . visualliser -2006 A.D.
|
|
|
|
|
Some XP user use the XP form style, some of them disable the style to use the classic one.
However, this style really affect the look of my form.
How can I know what is this setting in user computer?
|
|
|
|
|
You can P/Invoke UxTheme.dll which controls the window styles in XP like this...
<DllImport("UxTheme.dll", _
CallingConvention:=CallingConvention.Winapi, _
CharSet:=CharSet.Auto)> _
Private Shared Function IsThemeActive() As Boolean
End Function If this function returns true, the user is running a theme, if it returns false then the user is running 'Windows Classic Style' - no themes.
Hope this helps
Cheers,
Will H
|
|
|
|
|
Thank you so much and It is really a great hint for me,
but it does not work by copy and paste.
Where should I place it in my module ?
Thank you~
|
|
|
|
|
To add it to a module you'll have to do two things...
1) Change the line
Private Shared Function IsThemeActive() As Boolean to
Public Function IsThemeActive() As Boolean (i.e. remove the word Shared and change the functions visibility to Public )
2) Add
Imports System.Runtime.InteropServices to the top of your file.
I havent done any VB.Net in a while so I hope that works
Cheers,
Will H
|
|
|
|
|
hi, i would like to insert a picture,(logo) of da company as a background and insert button ENTER on that.but i dont know how,sir, could u pls help me on doing that..thanx a lot.
|
|
|
|
|
You can specify a BackgroundImage for a form and place your buttons and other controls on the form as normal.
Other things that might be better for what you want are placing a PictureBox on the form with the logo in it. To make sure it stays behind the other controls, from the Format menu, choose Order > Send to back.
Or, place a Panel control on the form and set the Background image of it to your logo. You can then place controls on the Panel control itself (panels are container controls)
Hope that helps!
|
|
|
|
|
Hello!
This sample procedure extracts email addresses and adds to database. However, it is successfully adding the first address and creating empty records for the others. I decided to test the procedure with vb.net and took out adding the database section. It worked perfectly. So I would like to know what is causing not to add other emails except the first one.
Thank You
Sub AddEmails()
Dim GetEmails
Dim SrchKey
Dim xPos
Dim x1, x2
Dim xAddr
GetEmails = Request.Form("emails")
xPos = 1
x1=Instr(xpos,GetEmails,VbCrLf)
DO WHILE xpos <= len(Getemails)
x1=Instr(xPos,GetEmails,vbCrLf)
x2=Instr(xPos+1 ,GetEmails,vbCrLf)
If x1 = 0 or x2 = 0 Then Exit Do
If xPos = 1 Then
xAddr = Mid(GetEmails,1,x1-1)
Elseif xpos > 1 Then
xAddr = Mid(GetEmails, x1, x2 - x1)
End If
If len(xAddr) > 4 Then
'check here if email address is not exist in the database
SrchKey = "SELECT * FROM emails WHERE email="& "'" & xAddr & "';"
Call InitializeConnection()
Call Establish_Recording(SrchKey)
If ObjectRecord.RecordCount <= 0 Then
ObjectRecord.Close
ObjectConnection.Close
Set ObjectRecord = Nothing
Call InitializeConnection()
Call InitializeRecordSet("Emails")
'PROBLEM IS CAUSED BY THE FOLLOWING STATEMENTS
'IT IS ADDING THE FIRST ADDRESS BUT NOT THE OTHERS
ObjectRecord.AddNew
ObjectRecord("email") = xAddr
ObjectRecord("Accept") = True
ObjectRecord.update
ObjectRecord.Close
ObjectConnection.Close
Set ObjectRecord = Nothing
Else
ObjectConnection.Close
End If
xAddr = ""
xpos = x2
End If
LOOP
Response.Write ("Email have been added!")
Response.End
End Sub
|
|
|
|
|
This is just a guess. Wouldn't the ( xAddr="" ) set a blank each time the program made a loop?
|
|
|
|
|
Hello!
Thanks for your respond. Xaddr returns a value eact time in the loop. I have tested the code with vb.net. I think having connection to database or recordset inseide the loop is causing the problem even though connection is getting closed and object record set to nothing.
|
|
|
|
|
Hello, I want to know how to move a picturebox when the form is resized! I know that I want to put code in the Form1_Resize handler. But i dont know what to code in there! please help me
Thanks alot
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
The picture box will move automatically if you set the control to anchor.
eg. picturebox.anchor = Bottom
raj
|
|
|
|
|
Hello, I have a problem with this third party program. I installed the DevX program. Now this is the problem, that if a computer does not have this program installed than my program do not open because this third program isn't installed in that computer. How can i use my with the third program in it on another computer without installing the third program and that pc.
Can this thing happen pls?
Adrian De Battista: .Net Programmer, Java Programmer and Web Designer.
|
|
|
|
|
Can anyone help me with with bringing up an IE window that prompts to first change the computername and second prompts for the username/password to join the domain?
|
|
|
|
|
Hi,
I have a question. How do you retrieve data from a textfile and have it displayed in VB. Net?
thanks for your help.
|
|
|
|
|
you can use IO.StreamReader(Server.MapPath("sms.txt")) to read ur text file.
or file open dialog box to open a file.
raj
|
|
|
|
|
Server.MapPath is only for a web environment. For a windows forms app you would need to know the whole path.
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Hi,
Does anyone know how to format a floppy disc without using DOS or Windows format windows. I am looking for code to format a floppy.
|
|
|
|
|
|
This is driving me mad. I have been working on windows forms application for a while and suddenly straight out of the blue the visual style for the buttons stopped working. That is, they go back to looking like buttons in Windows 2000. All other controls that support visual styles seem to be working ok.
Does anyone know anything about how to fix this? The really wired thing is that when I tried to do a new form in the same project all works ok for a few compilations and then the buttons just go back to ugly mode again.
By the way I’m using .Net 1.1 and visual studio 2003.
Regards Johan
|
|
|
|