|
Use some form of binary datatype in the database. Insert it from a byte array. Without knowing more about the basics such as which database and whether it's an ASP.NET or WinForms project then I can't really offer you any more advice than that.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Do you know something about BLOB?
Check, it may help you.
|
|
|
|
|
I found a way to write my game in c#, but it using 3d graphics. XP and voodoo3 don't agree with each other. So i need to know how to change this so i can use software or change it to full screen when it opens:
namespace WindowsGame1
{
class Engine : Microsoft.Xna.Framework.Game
{
Microsoft.Xna.Framework.GraphicsDeviceManager Graphics;
Microsoft.Xna.Framework.Content.ContentManager Content;
Microsoft.Xna.Framework.Graphics.Texture2D mytext;
Microsoft.Xna.Framework.Graphics.SpriteBatch SpriteBatch;
Microsoft.Xna.Framework.Vector2 Spritepos;
public Engine()
{
this.Graphics = new Microsoft.Xna.Framework.GraphicsDeviceManager(this);
this.Content = new Microsoft.Xna.Framework.Content.ContentManager(this.Services);
}
protected override void Initialize()
{
this.Spritepos = new Microsoft.Xna.Framework.Vector2(100f, 50f);
base.Initialize();
}
protected override void LoadGraphicsContent(bool loadAllContent)
{
if (loadAllContent)
{
this.mytext = this.Content.Load<microsoft.xna.framework.graphics.texture2d>(@"new\text\Mike1");
this.SpriteBatch = new Microsoft.Xna.Framework.Graphics.SpriteBatch(this.Graphics.GraphicsDevice);
}
}
protected override void UnloadGraphicsContent(bool unloadAllContent)
{
if (unloadAllContent)
{
this.Content.Unload();
}
}
protected override void Update(Microsoft.Xna.Framework.GameTime gameTime)
{
base.Update(gameTime);
}
protected override void Draw(Microsoft.Xna.Framework.GameTime gameTime)
{
this.Graphics.GraphicsDevice.Clear(Microsoft.Xna.Framework.Graphics.Color.Black);
this.SpriteBatch.Begin(Microsoft.Xna.Framework.Graphics.SpriteBlendMode.AlphaBlend);
this.SpriteBatch.Draw(this.mytext, this.Spritepos, Microsoft.Xna.Framework.Graphics.Color.White);
this.SpriteBatch.End();
base.Draw(gameTime);
}
}
}
Michael
(Up and coming Game programmer)
EST
|
|
|
|
|
What? What are you asking here? I'm sorry, but I read and reread your post and I still don't know what the question really is? Are you asking how to get the code to run in full screen mode when it's running? If so, the graphics device has a property called IsFullScreen . Set it to true.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
HI,
is there any way that i can put text at the Row Header?
THNKS
kobkob
|
|
|
|
|
Yes. Take a look at the DataGridView documentation - it is really quite easy once you get the idea that the header cell is similar to other cells in the datagridview.
Suppose you wanted to set the text for row 0's row header... you could do this:
dataGridView1.Rows[0].HeaderCell.Value = "Some String";
Good Luck!
It isn't enough to do well in life.
One must do good when and where one can.
Otherwise, what's the point?
|
|
|
|
|
THNKS
kobkob
|
|
|
|
|
I need to find an integer element in this 2d list and modify it.
|
|
|
|
|
It's a list like this: List<List<int>>
|
|
|
|
|
Not tested:
list is List<List<int>>
foreach(List<int> list2 in list)
{
int index = list2.IndexOf(value);
if(index != -1)
{
list2[index] = newvalue;
break;
}
}
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Loop through the outer list, for every list loop through the inner list and look for the item.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi there, I just installed Microsoft Visual C# 2008 Express edition and after publishing to local disk, when I run the setup.exe file it spits out a blank message box and blank form with the setup icon on it. Has anyone experienced this before? Where could I find out more do you think?
Thanks for the help
Linden
|
|
|
|
|
Does your machine meet the minimum hardware requirements? I dunno what they are for the Express Editions - I installed the Professional edition.
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
|
|
|
|
|
How would that make a difference? It's not visual studio that won't install it's on of the applications that I compiled with Visual studio. I imported the project from 2005 but when I published it in 2008 the setup didn't work.
My dilemma
|
|
|
|
|
|
HI,
can i put for Example :3 ComboBox in a specific cell
THNKS
kobkob
|
|
|
|
|
kobibi wrote: Example :3 ComboBox
What?
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
|
|
|
|
|
HI,
Q1 :
can i build a Row in a data set that will have Multiline
For Example :3 ComboBox Cells in a specific cell
?
Q2 :
can i add any kind of Controls to the Data Set
For Example : myControl - somthing i created
?
if anyone can HLEP
THNKS
kobkob
|
|
|
|
|
Why on earth would you want to add controls to datasets? Use datasets for CRUD operations & create controls to display that data.
But fortunately we have the nanny-state politicians who can step in to protect us poor stupid consumers, most of whom would not know a JVM from a frozen chicken. Bruce Pierson
|
|
|
|
|
Sorry , i meant DataGridView
kobkob
|
|
|
|
|
Since those appear to be one and the same question, the answer is yes, you can.
Take a look at this example:
http://msdn2.microsoft.com/en-us/library/aa730881(VS.80).aspx[^]
Everywhere it uses the numeric up down, you would replace with your control. Note, if you want 3 combo boxes in one cell, you're going to have to create a custom control that contains 3 combo boxes, and write all of the data binding code yourself.
The early bird who catches the worm works for someone who comes in late and owns the worm farm. -- Travis McGee
|
|
|
|
|
THNKS man
So Simple
THNKS Alot
kobkob
|
|
|
|
|
i havetwo PCs one with resolution 800*600 and second Pc with resolution 1024*768 i have made a windowform where i place a groupbox full of controls the problem is this that when i run that application on 800*600 pixels PC the controls are displayed as the were placed on the form but when i run it on the PC with 1024*768 resolution the controls are squeezed on the form leavingl ot of space empty on the form how to over come this problem
sas
|
|
|
|
|
Set the dock and anchor properties of your controls so that it sizes properly
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Dear All,
Am having Nearly 470 Text files. I want to do a text replacement in all these files. There are 60-80 replacements in each page. here is sample contents of one of the file
<input type=hidden name="item" value="Kansas State Backpack"><br />
<input type=hidden name="Price" value="39.99"><br />
<input type=hidden name="PartNo" value="XXX-XX"><br />
<input type=submit value="Add to Cart"><br />
</form><br />
<p><a href="javascript:popUp('../images/Backpack/158-62.jpg')"><br />
<br />
<input type=hidden name="item" value="Oregon Backpack"><br />
<input type=hidden name="Price" value="39.99"><br />
<input type=hidden name="PartNo" value="XXX-XX"><br />
<input type=submit value="Add to Cart"><br />
</form><br />
<p><A HREF="javascript:popUp('../images/Backpack/194-62.jpg')"><br />
<br />
<input type=hidden name="item" value="Arizona Backpack"><br />
<input type=hidden name="Price" value="39.99"><br />
<input type=hidden name="PartNo" value="XXX-XX"><br />
<input type=submit value="Add to Cart"><br />
</form> <br />
<p><A HREF="javascript:popUp('../images/Backpack/106-62.jpg')">
Here for value XXX-XX it must be replaced with the .JPG file name which comes below.
I have Created a Desktop Application in C# to do this. its getting converted but the alignment changes happens for files.
Am doing it this way
1) Am Opening Text File
private const string FILE_TAG = "[FILE]";<br />
private const string FILENAME_TAG = "[NAME]";<br />
private const string FILE_FILTER = "Text files (*.txt)|*.txt|All files (*.*)|*.*";<br />
<br />
private bool m_bIncludeRelativePath = false;<br />
private bool m_bRecurseSubDirs = false;<br />
<br />
private string m_sFilePath = string.Empty;<br />
private string m_sSourcePath = string.Empty;<br />
private string m_sInputTemplate = string.Empty;<br />
string sPingPath = string.Empty;<br />
public TEXT_REPLACE()<br />
{<br />
InitializeComponent();<br />
}<br />
private string GetOpenFilePath()<br />
{<br />
string sFilePath = string.Empty;<br />
<br />
OpenFileDialog openFile = new OpenFileDialog();<br />
openFile.Title = "Open File";<br />
openFile.Filter = FILE_FILTER;<br />
<br />
if (openFile.ShowDialog() == DialogResult.OK)<br />
{<br />
sFilePath = openFile.FileName;<br />
sPingPath = openFile.FileName;<br />
}<br />
<br />
<br />
return sFilePath;<br />
}<br />
private string LoadFile(string sFilePath)<br />
{<br />
FileStream file = null;<br />
StreamReader sr = null;<br />
string sContents = string.Empty;<br />
try<br />
{<br />
if (sFilePath.Trim() == string.Empty)<br />
{<br />
sFilePath = GetOpenFilePath();<br />
if (sFilePath.Trim() == string.Empty)<br />
{<br />
return string.Empty;<br />
}<br />
<br />
}<br />
<br />
FileInfo fsi = new FileInfo(sFilePath);<br />
<br />
string sFullPath = fsi.FullName;<br />
<br />
file = new FileStream(sFullPath, FileMode.OpenOrCreate, FileAccess.Read);<br />
<br />
sr = new StreamReader(file);<br />
<br />
string s = sr.ReadToEnd();<br />
sContents = s;<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show("LoadFile() Error: " + ex.Message, "LoadFile Error", MessageBoxButtons.OK, MessageBoxIcon.Error);<br />
}<br />
finally<br />
{<br />
if (sr != null)<br />
sr.Close();<br />
<br />
if (file != null)<br />
file.Close();<br />
}<br />
<br />
return sContents;<br />
}<br />
private void btnOpenFile_Click(object sender, EventArgs e)<br />
{<br />
<br />
Convert(GetOpenFilePath());<br />
<br />
<br />
}
2) Converting It and putting to a richtextbox
public void Convert(string Pathstring)<br />
{<br />
bool change = false;<br />
<br />
StreamReader re = File.OpenText(Pathstring);<br />
string test = "";<br />
string input = null;<br />
while ((input = re.ReadLine()) != null)<br />
{<br />
<br />
<br />
if (input.Contains("XXX-XX"))<br />
{<br />
change = true;<br />
<br />
}<br />
if (change == true)<br />
{<br />
if (input.Contains(".jpg"))<br />
{<br />
if (test.Contains("XXX-XX"))<br />
{<br />
test = test.Replace("XXX-XX", GetFilename((input)));<br />
}<br />
}<br />
}<br />
<br />
test += input+"\r\n";<br />
}<br />
re.Close();<br />
richTextBox1.Text = test;<br />
}<br />
public string GetFilename(string line)<br />
{<br />
string filename="";<br />
string[] Arr = line.Split('/');<br />
for (int i = 0; i <= Arr.Length - 1; i++)<br />
{<br />
if (Arr[i].Contains(".jpg"))<br />
{<br />
filename = Arr[i].ToString();<br />
}<br />
}<br />
filename=filename.Substring(0,filename.IndexOf(".jpg"));<br />
return filename;<br />
}
3 Saving it
private string GetSaveFilePath(string sInitialPath, string sDefaultFileName)<br />
{<br />
string sFilePath = string.Empty;<br />
<br />
SaveFileDialog saveFile = new SaveFileDialog();<br />
saveFile.Title = "Save File";<br />
saveFile.Filter = FILE_FILTER;<br />
<br />
if ((sInitialPath != null) && (Directory.Exists(sInitialPath) == true))<br />
{<br />
saveFile.InitialDirectory = sInitialPath;<br />
}<br />
<br />
if ((sDefaultFileName != null) && (sDefaultFileName.Length > 0))<br />
{<br />
saveFile.FileName = sDefaultFileName;<br />
}<br />
<br />
if (saveFile.ShowDialog() == DialogResult.OK)<br />
{<br />
sFilePath = saveFile.FileName;<br />
}<br />
<br />
return sFilePath;<br />
}<br />
private void btnSaveFile_Click(object sender, EventArgs e)<br />
{<br />
TextBox txtActive = GetActiveTabTextBox();<br />
<br />
SaveFile(sPingPath, richTextBox1.Text);<br />
<br />
}
So right now while saving the file its alignment is getting changed like this
<input type=hidden name="item" value="Kansas State Backpack"><input type=hidden name="Price" value="39.99"><input type=hidden name="PartNo" value="XXX-XX"><br />
can someone please help me out to sort this issue.
Thnaks in advance
-- modified at 5:25 Sunday 7th October, 2007
|
|
|
|