Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
V

VengefulSakhmet

@VengefulSakhmet
About
Posts
20
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • New to Flash
    V VengefulSakhmet

    The library idea makes complete sense. It's used in other languages. Perhaps I'm not sure how to navigate thru the flash editor yet, but the library seems to only be filled with jpegs, movie clips, and etc. Is there a special section I should be looking in that I am just passing over?

    Web Development question adobe help tutorial

  • New to Flash
    V VengefulSakhmet

    I'm going through a Flash tutorial and comparing it against a Flash program we have received from a 3rd party. Within the 3rd party package there are separate files that contain code. The .fla file only appears to contain movie clips, jpegs, and etc. In the tutorial file it appears the code is layered in the .fla file. My question is do flash developers alter the .fla files to hide code from end users, or is the .fla file just structured differently? I'm leaning towards an altered .fla file and only by accessing the .as files directly through the code folder, seeing I cannot find any code by going through the .fla file. Thanks for any help in advance.

    Web Development question adobe help tutorial

  • Event Validation
    V VengefulSakhmet

    I am trying to have the button in my gridview create a popup when clicked. I receive this error during runtime after I select "Ok" in the popup. Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. If I make enableEventValidation false, it runs fine, but that's not a secure way to do it. While performing a google search they allude to there being another way, but do not elaborate. Any ideas?

    <%@ Page Language="C#" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <style type="text/css">
    body
    {
    background-color: #CCF0FF;
    font-family: Verdana, Arial, Helvetica, Sans-Serif;
    font-size: small;
    color: Black;
    margin-top: 50px;
    margin-left: 60px;
    margin-right:50px;
    border-color: Black;
    }
    p
    {
    text-align:right;
    }
    </style>
    <title>Register for Classes</title>
    </head>
    <body>

    <script runat="server">
        
        public string ConnectionPath;
        public string register = "Register";
    
        protected void Page\_Load(object sender, EventArgs e)
        {
            try
            {
                System.Data.DataTable t1 = new System.Data.DataTable();
                t1.Columns.Add("LeafName");
                t1.Columns.Add("TeacherName");
                t1.Columns.Add("SemesterEnds");
                t1.Columns.Add("ApplicableTracks");
                t1.Rows.Add("Nmap Basics", "Prof. Zhang", "Aug 23 - Nov 3", "ClassDescriptions.aspx#Anchor1");
                t1.Rows.Add("Nmap Advanced", "Prof. Scmidt", "Oct 20 - Dec 5", "ClassDescriptions.aspx#Anchor2");
                t1.Rows.Add("Nmap Advanced II", "Prof. Strauss", "Jan 5 - Mar 27", "ClassDescriptions.aspx#Anchor3");
                t1.Rows.Add("Firewall and Router Fundamen
    
    ASP.NET csharp html css sysadmin security

  • Edit String Before Gridview Display
    V VengefulSakhmet

    I don't think substring will work for me because the column I am selecting has differing string lengths and from what I googled, it appears I need to know the length of the string I wish to keep. Perhaps there is a sql command I missed. I was trying to do a while loop "while(reader.Read())", but I wasn't sure exactly how to handle the reader contents. I had assumed that since it is a reader that I cannot write to its contents. Am I wrong in this assumption? I had tried to assign each iteration of reader to a string array, but that does not appear to be the path I wish to go down. My main issue is understanding what data type is coming out of reader and what format its data must be to be accepted during databinding. So, am I right about the reader and is the table idea bad? Thanks!

    ASP.NET database csharp wpf wcf sysadmin

  • Edit String Before Gridview Display
    V VengefulSakhmet

    I am just starting to use ASP and am very green to its data structures, so I'm probably going about this completely wrong. On the C# side I have connected to the database and taken the info I need, but I need to strip the string of the extension before it's displayed on the asp side. Without the whole table and databinding, I would feel confident doing this, but with these two factors I'm not sure how to go about this. Is there any easy way to make my query into a table and then edit that table's entries, and set that to the datasource for binding, or am I looking at this the wrong way?

        SqlConnection conn = new SqlConnection(ConnectionPath);
        conn.Open();
        string queryClasses = "SELECT WSS\_Content.dbo.AllDocs.LeafName FROM 
    

    WSS_Content.dbo.AllDocs LEFT OUTER JOIN WSS_Content.dbo.RecycleBin ON WSS_Content.dbo.AllDocs.Id =
    WSS_Content.dbo.RecycleBin.DocId WHERE (WSS_Content.dbo.RecycleBin.DocId IS NULL) AND (WSS_Content.dbo.AllDocs.Extension = 'zip')";
    SqlCommand availableClasses = new SqlCommand(queryClasses, conn);
    SqlDataReader reader = availableClasses.ExecuteReader();
    SQLQueryClassListings.DataSource = reader;
    SQLQueryClassListings.DataBind();
    reader.Close();

    <asp:GridView ID="SQLQueryClassListings" AutoGenerateColumns="false" runat="server" 
    

    BorderWidth="1px" BackColor="White" CellPadding="5" BorderColor="DodgerBlue" HeaderStyle-
    BackColor="#0147FA" HeaderStyle-ForeColor="White">
    <Columns>
    <asp:BoundField HeaderText="Class Titles" DataField="LeafName" />
    <asp:ButtonField ButtonType="Button" HeaderText="Register" Text="Register"/>
    </Columns>
    </asp:GridView>

    ASP.NET database csharp wpf wcf sysadmin

  • [Message Deleted]
    V VengefulSakhmet

    [Message Deleted]

    C#

  • Simple problem with brackets [modified]
    V VengefulSakhmet

    Dear Aman, The tutorial I had posted at the top called "Hello World C#" should work correctly. Perhaps your directories and libraries are not properly set up. Take a look at: Visual Studio Getting Started. I would go to the FAQ section and look up installation procedures. Also post your full code. I assume you are trying to write a small program for starters, so it shouldn't be hard to tell if your program would compile properly in the right environment. Best of luck! -Laurel

    C# help csharp learning

  • Simple problem with brackets [modified]
    V VengefulSakhmet

    Hello World C# Go through this tutorial. It should help get you on the right start. You can even download the code and try to compile that by itself. If that fails to compile then you may have issues with how your directories are set up. Best of luck!

    C# help csharp learning

  • Passing C# variable to HTML page
    V VengefulSakhmet

    What type would graphImage.Src be defined as within my c# code? My code needs to save a picture to a local folder, navigate to an html file via webbrowser offscreen displaying said prior saved photo (by accessing it via the local folder path which I want to pass to it), take an offscreen screenshot, and save to file. In the end certain bits of data will also need to be created at runtime and displayed on the webbrowser for the screenshot. They want an image report. :| I guess I better start reading up on ASP. Everything else works fine except for accessing the picture in html without hardcoding it because I still am a bit in the dark about how this is passing the pathway to the image at runtime.

    <%@ Language="C#" Inherits="ChartContainer.ScreenShotWin" %>

    <html>
    <head>
    <title></title>
    </head>
    <body>
    <img alt="Missing Graph" runat="server" id="graphImage" />
    blah blah blah...

    private void ScreenShotWin_Load(object sender, EventArgs e)
    {
    filePath = Environment.GetFolderPat(Environment.SpecialFolder.LocalApplicationData) + "\\temp.bmp";
    webBrowser1.Navigate("C:\\Projects\\HTMLReport.htm");
    System.Windows.Forms.Timer t = new System.Windows.Forms.Timer();
    t.Interval = 1000;
    t.Tick += new EventHandler(t_Tick); //sets off the screenshot
    t.Start();
    }

    C# csharp html data-structures tutorial question

  • Passing C# variable to HTML page
    V VengefulSakhmet

    I'm still a bit confused since I haven't worked with this before. The path: string filePath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\temp.bmp"; is located in ChartContainer.ScreenShotWin. From what you wrote, I would assume I would make these changes to my hardcoded html file, but this is not solving passing filePath. File '<%=filePath%>' was not found. <%@ Language="C#" Inherits="ChartContainer.ScreenShotWin" %> <html> <head> <title></title> </head> <body> <img src=<%=filePath%> alt="Graph"/> </body> </html> What am I still misunderstanding? Thank you!

    C# csharp html data-structures tutorial question

  • Screenshot after WebBrowser Navigates
    V VengefulSakhmet

    Actually, the URLs matching is another one of fun parts. When it finishes navigating, the URLs match, the page is still not loaded. It turned out to be a threading issue. I created a timer after my webbrowser navigated and checked per every 1000 ticks if the readystate was equal to complete. Very annoying, but it works now. A lesson well learned about trusting documentation. Thank you for your help.

    C# com help

  • Passing C# variable to HTML page
    V VengefulSakhmet

    This is probably pretty simple, but I'm a bit unsure of how to approach this. I have a path to a particular bmp file in my C# code. I want to display this picture in my HTML page. How would I pass this path to the HTML code instead of hardcoding the path? C#: string filePath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\\temp.bmp"; HTML (hard coded at the moment): <img src="C:\\Users\\L****\\AppData\\Local\\Program\\temp.bmp" alt="Graph"/>

    C# csharp html data-structures tutorial question

  • Screenshot after WebBrowser Navigates
    V VengefulSakhmet

    I'm trying to make my program take a screenshot of a webbrowser after it finishes navigating and all I seem to be able to do is take a screenshot of it before it finishes navigating (a white rectangle). It's probably something very simple that I just keep missing, but am getting too annoyed to see it. I stepped through it and apparently it takes the screenshot when the webBrowserForScreenShot is called after Navigate has been called, but no image is present. However the url is set for the webbrowser to the address it was sent by navigate. I also tried a while loop until webBrowser.ReadyState = complete, but ended up in an infinite loop. I tried adding Application.DoEvents(); as the action in the loop and then end up with a black rectangle. Btw, it does load the page after all is said and done, just too late to be a part of the screenshot. Any help would be great! public ScreenShotWin() { InitializeComponent(); openWebBrowser(); } public void openWebBrowser() { webBrowser1.Navigate("http://google.com"); } private void webBrowserForScreenShot(object sender, WebBrowserDocumentCompletedEventArgs e) { IntPtr htmlWindow = webBrowser1.Handle; CaptureWindowToFile(htmlWindow, "C:\\Interbank.bmp", ImageFormat.Bmp); } this.webBrowser1.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.webBrowserForScreenShot);

    C# com help

  • [Message Deleted]
    V VengefulSakhmet

    Sorry if I was too vague. For this instance I am trying to export a screenshot to a bmp file, but need to enter in some specifics about the selected object I am taking a screenshot of to the top the bmp. It will end up looking like a small report on top with an attached screenshot on the bottom. I think there was hope of using this also in winforms, hence the ambiguity. I'm just having a bit of a mental road block visualizing using HTML vs. using GDI.

    C#

  • [Message Deleted]
    V VengefulSakhmet

    [Message Deleted]

    C#

  • Custom Treeview with Overridden OnPaint & WndProc
    V VengefulSakhmet

    HideSelection will not work for this instance and changing the BackColor will not address the issue I have. My button moves the selected node up and down. Since it is no longer the focus, it turns from medium blue to light gray. I did however figure out how to override WndProc: protected override void WndProc(ref Message m) { base.WndProc(ref m); switch (m.Msg) { case (15): { PaintEventArgs pae = new PaintEventArgs( Graphics.FromHwnd((m.HWnd)), new Rectangle(0, 0, this.Width, this.Height)); OnPaint(pae); break; } default: { break; } } } Thanks for trying!

    C# graphics game-dev

  • Custom Treeview with Overridden OnPaint & WndProc
    V VengefulSakhmet

    Not entirely sure that is the direction I want to be taking. This just appears to erase my entire custom treeview with no call to OnPaint. I'm trying to keep the way the rest of the nodes aside from a selected node to look the norm. I need to keep the selected node the focus color as buttons are pressed even though this goes against standard convention. The thought was to make a custom treeview with custom onpaint to repaint this one node with a rectangle using onpaint and then putting back the original text on top. Then I read this: http://www.codeproject.com/Messages/685886/Re-Custom-Tree-View-Painting.aspx and came to the overriding WndProc, but was unsure on how to procede with the call to OnPaint.

    C# graphics game-dev

  • Custom Treeview with Overridden OnPaint & WndProc
    V VengefulSakhmet

    I am attempting to do a custom OnPaint on a custom Treeview with a lot of bumps along the way. At this point in the game, I'm just trying to get a purple rectangle to print out anywhere involving this TreeView. I'll work on the bounds afterwards. I found out the long way that WndProc turns off OnPaint and am trying to now to override WndProc, but I have absolutely no idea what to pass to OnPaint seeing this is my first attempt at GDI and from all the examples I've been looking at OnPaint appears to be called implicitly by other Win Forms. Please point me in the right direction. public class myProfileTree : System.Windows.Forms.TreeView { protected override void OnPaint(PaintEventArgs e) { Graphics g = e.Graphics; SolidBrush brush = new SolidBrush(Color.MediumOrchid); Rectangle blueRectangle = new Rectangle(50, 50, 200, 100); g.FillRectangle(brush, blueRectangle); } protected override void WndProc(ref Message m) { switch (m.Msg) { case(15): { OnPaint( :confused: ); break; } default: { break; } } base.WndProc(ref m); } }

    C# graphics game-dev

  • Custom TreeView
    V VengefulSakhmet

    Yup, funny. I've been googling all morning and I just came upon bounds a minute before you answered. Thank you for the reply!

    C# help question

  • Custom TreeView
    V VengefulSakhmet

    I'm trying to create a custom treeview that will draw a blue rectangle over a selected node and then redraw the text over it. Is there any command that can help me find the (x,y) coordinates of the node? The node can be selected by either mouse, keyboard, or a button. Any suggestions?

    C# help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups